I'm trying to use use Protect-PGP in an Azure Automations Runbook. The cmdlet runs great using the 7.1 preview Runbooks but returns the following exception on 5.1:
Protect-PGP - Can't encrypt string: Exception calling "EncryptArmoredString" with "1" argument(s): "Premature end of stream in PartialInputStream"
The code that I'm using is very simple for testing:
Protect-PGP -FilePathPublic $KeyPath -String "This needs to be protected"
I've also attempted to test with in input file and it returned a very similar error:
Protect-PGP - Can't encrypt file C:\Users\Client\Temp\ToProtect.txt: Exception calling "EncryptFile" with "2" argument(s): "Premature end of stream in PartialInputStream"
Hey Team,
I'm trying to use use Protect-PGP in an Azure Automations Runbook. The cmdlet runs great using the 7.1 preview Runbooks but returns the following exception on 5.1:
Protect-PGP - Can't encrypt string: Exception calling "EncryptArmoredString" with "1" argument(s): "Premature end of stream in PartialInputStream"
The docs for the Runbooks state that the sandbox where the scripts run have .NET Framework 4.7.2, so it should meet the requirements of the Module https://docs.microsoft.com/en-us/azure/automation/automation-runbook-execution#runbook-execution-environment
The code that I'm using is very simple for testing:
Protect-PGP -FilePathPublic $KeyPath -String "This needs to be protected"
I've also attempted to test with in input file and it returned a very similar error:
Protect-PGP - Can't encrypt file C:\Users\Client\Temp\ToProtect.txt: Exception calling "EncryptFile" with "2" argument(s): "Premature end of stream in PartialInputStream"