I am trying to run a signed PS script from a cmd window using this command:
powershell.exe -ExecutionPolicy bypass -File \\server01.company.local\emp\TestParams2.ps1 myserver "\\server1\folder name\file.txt" 9999
When I do, I get this:
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):
I signed the script and it is not blocked. AND I can run it from other servers in the same zone and subject to the same group policies, logged in as the same user, without having this confirmation request come up. I must have a setting that is specific to this machine that is blocking it, but I can't figure it out. These are the current execution policies:
powershell Get-executionpolicy -list
Scope ExecutionPolicy
----- ---------------
MachinePolicy Unrestricted
UserPolicy Unrestricted
Process Undefined
CurrentUser Bypass
LocalMachine Bypass
What am I missing?