I have created a PowerShell module and want to sign it and then will add to public repository.
I have tried below code
$TimeStampServer = “http://timestamp.digicert.com” $PS1 = "C:UsersnaveenDownloadsmy.psm1" $codeCert = Get-ChildItem Cert:CurrentUserMy | Where-Object {$_.Subject -eq “CN=naveen”} Set-AuthenticodeSignature -FilePath $PS1 -Certificate $codeCert -TimeStampServer $TimeStampServer
But getting below error:
Set-AuthenticodeSignature : Cannot bind argument to parameter ‘Certificate’ because it is null.