• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Question Windows 10 Powershell and execution policy

Scarpozzi

Lifer
So I've been using powershell a lot for about 11-12 years now. I was one of those who got moved up to Windows 10 in the last month from Windows 7. My system was upgraded to Windows 10 from 7...so my files never moved.

I've been using 10 for a while on laptops, so there's not much learning curve for me.

My issues is that I have many scripts that I run throughout the day. When I right click a script and select "Run with PowerShell", the shell opens and I get the Execution Policy Updated message. I have everything but the user and group policies set to Unrestricted and it still pops up. Those policies are set as undefined. If I refuse to answer Yes No, All, etc...and close the Window and run the script again, it the script executes without the message. Of course, scheduled tasks I have run with the -bypass flag, so they run fine.

What gives?
 
This is what my execution policy looks like now:

Get-ExecutionPolicy -List

Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Unrestricted
LocalMachine Unrestricted

Anytime I run a script in the shell, the first one hits me with that message still. I've not found a workaround when running scripts manually. When scheduling stuff, I can throw the bypass flag on the script execution.
 
Back
Top