When using the 'Run Powershell script' action and we encounter the following type of error, we should check the execution policy of the machine and set it to "Unrestricted".

--------------------------------------------------------------------------------------------------------------------------------

File C:\Users\uXXXX\AppData\Local\Temp\8b330e0d-2d08-4881-a88d-a22ae7cc12cd.ps1 cannot be loaded.

The file

C:\Users\u52840\AppData\Local\Temp\8b330e0d-2d08-4881-a88d-a22ae7cc12cd.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 https:/go.microsoft.com/fwlink/?LinkID=135170.

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


+ FullyQualifiedErrorId : UnauthorizedAccess

--------------------------------------------------------------------------------------------------------------------------------

Powershell command to check the execution policy:  Get-ExecutionPolicy 

Powershell command to set the execution policy: Set-ExecutionPolicy Unrestricted (Powershell window needs to run as admin) & confirm the change with Y