When you use the ISE to create a ps1, the default encoding is 'Unicode big endian'.Then Set-AuthenticodeSignature returnsStatus : UnknownErrorStatusMessage : The data is invalidPath : C:\temp\Test-ScriptEncoding.ps1Use notepad.exe to save the file as UTF-8 and the command returns Status : ValidStatusMessage : Signature verified.Path : C:\temp\Test-ScriptEncoding.ps1-------$PSVersionTable["BuildVersion"].ToString()7.0.6002.18111