question

Ryou-0910 avatar image
0 Votes"
Ryou-0910 asked

Powershell execution policy seems not to be reflected

I changed the PowerShell execution policy to remotesigned to run some of my PowerShell scripts. After that,
I changed my policy to restricted. However, I still can run my past scripts and new scripts which I made to test the policy.
I think the policy is not reflected in my machine.
How do I fix this problem to apply the policy correctly?

now, get-executionpolicy -list command shows like this, but still I can run .ps1 scripts.

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

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers