VMware Cloud Community
philk33
Enthusiast
Enthusiast

ps1 files will not load because they are not digitally signed (they are)

Hello,

I get this error when trying to run a ps1 file in a guest:

ile C:\Windows\TEMP\vmware74\vco_vmware99.ps1 cannot be loaded. The file

C:\Windows\TEMP\vmware74\vco_vmware99.ps1 is not digitally signed. You cannot

run this script on the current system. For more information about running

scripts and setting execution policy, see about_Execution_Policies at

http://go.microsoft.com/fwlink/?LinkID=135170.

    + CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecord

   Exception

    + FullyQualifiedErrorId : UnauthorizedAccess

The file is digitally signed with a V2 signing cert template from our CA.

pastedImage_2.png

It repeatedly does this. Sometimes it won't fail, sometimes it will. Any ideas? If I have to live with it, what is the best way to retry running the script?

Thanks

Reply
0 Kudos
3 Replies
mikemorgan
Contributor
Contributor

Is the signer of the certificate trusted?  Based on the error ParentContainsErrorRecord, it would likely be that the the certificate used to sign the script is not trusted.  Verify you have the issuer in your Trusted Publishers.

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee

Hi,

Could you check if the workaround suggested at http://tritoneco.com/2014/02/21/fix-for-powershell-script-not-digitally-signed/  works for your use case?

Reply
0 Kudos
philk33
Enthusiast
Enthusiast

Here is the output from the Get-AuthenticodeSignature ps1 command:

TimeStamperCertificate :

Status                 : Valid

StatusMessage          : Signature verified.

Path                   : C:\XXX\XXXX\XXXXX\Horizon 7 Patching Scripts\UnzipSHQ_IC.ps1

SignatureType          : Authenticode

IsOSBinary             : False

I don't think that's the case as our corporate CA is joined to the root domain. Also, it will run properly from time to time with zero issues. So to me there seems to be something else occurring.

Also, The GPO doesn't allow us to bypass the execution policy.

Reply
0 Kudos