How to bypass the execution policy when running a script or PowerShell commands from Ghost Solution Suite console
search cancel

How to bypass the execution policy when running a script or PowerShell commands from Ghost Solution Suite console

book

Article ID: 218636

calendar_today

Updated On:

Products

Ghost Solution Suite

Issue/Introduction

In Ghost Solution Suite, we have two types of PowerShell jobs:

  • Restrict Powershell execution policy   (Which disable the execution of PowerShell scripts on the agent )
  • Unrestrict Powershell execution policy (Which Enable the execution of PowerShell scripts on the agent )

How can we run a command or script by Bypassing the execution policy?

 

Environment

Release : 3.3

 

Resolution

If you want to run a command or script which needs to be in Unrestricted Execution Policy, but you don't want to enable/unrestrict the Execution Policy permanently, you need to Bypass the execution policy.

To do that, use the Restrict PowerShell Execution policy but run it using admin credentials.