I am trying to run a cmd
file that calls a PowerShell script from cmd.exe
, but I am getting this error:
Management_Instal
If you are in an environment where you are not an administrator, you can set the Execution Policy just for you, and it will not require administrator.
Set-ExecutionPolicy -Scope "CurrentUser" -ExecutionPolicy "RemoteSigned"
or
Set-ExecutionPolicy -Scope "CurrentUser" -ExecutionPolicy "Unrestricted"
You can read all about it in the help entry.
Help Get-ExecutionPolicy -Full
Help Set-ExecutionPolicy -Full