Invoke Power Shell: Exception calling "Decrypt" with "0" argument(s):

Hello,

I build the following command using assign
“(Get-Item -Force -LiteralPath “+ReportFilePath+”).Decrypt()”
ReportFilePath is the file full name
The resulting string is set in PSCommand string variable

Write Line tells me the string is correct:
(Get-Item -Force -LiteralPath C:\Users\MyName\Documents\Reports\Report-RO125678-1.csv).Decrypt()

I can copy this command in a powershell window and it works.

Then an invoke powershell activity is executed with PsCommand as the command text.
The following error occurs:
Invoke Power Shell: Exception calling “Decrypt” with “0” argument(s):

Thanks for helping me figure out what’s wrong.

Hi @dom107,
Try to work this way. It should work: