I am trying to run a cmd
file that calls a PowerShell script from cmd.exe
, but I am getting this error:
Management_Instal
You can also bypass this by using the following command:
PS > powershell Get-Content .\test.ps1 | Invoke-Expression
You can also read this article by Scott Sutherland that explains 15 different ways to bypass the PowerShell Set-ExecutionPolicy
if you don't have administrator privileges:
15 Ways to Bypass the PowerShell Execution Policy