How to Restrict PowerShell Script Execution for Standard Users
Limit PowerShell script abuse by tightening execution policies, and use Kudu to help audit risky system settings.
By the Kudu Team
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →What Causes This?
PowerShell is installed by default on Windows and can run scripts that automate system changes. If execution policies are left too permissive, standard users may be able to launch unsigned or unapproved scripts, which increases the risk of malware, unauthorized changes, or abuse of built-in admin tools. In many cases, the issue comes from default settings, inconsistent Group Policy rules, or older machines where PowerShell restrictions were never reviewed.
Common Symptoms
- Standard user accounts can run
.ps1scripts without warnings - Unknown PowerShell windows briefly appear during startup or login
- Security software reports suspicious script activity
- Users can launch automation scripts from Downloads, Desktop, or shared folders
- IT audits show weak or inconsistent PowerShell execution policies
How to Fix It Manually
-
Check the current PowerShell execution policy
- Press
Start, typepowershell. - Right-click Windows PowerShell and choose Run as administrator.
- In the PowerShell window, run:
Get-ExecutionPolicy -List - Review the results. Pay attention to
LocalMachine,CurrentUser, and anyMachinePolicyorUserPolicyentries.
- Press
-
Set a stricter execution policy for the computer
- In the same elevated PowerShell window, run:
or, for stricter control:Set-ExecutionPolicy RemoteSigned -Scope LocalMachineSet-ExecutionPolicy AllSigned -Scope LocalMachine - Type
Yand pressEnterto confirm. RemoteSignedallows local scripts but blocks unsigned scripts downloaded from the internet.AllSignedrequires every script to be signed.
- In the same elevated PowerShell window, run:
-
Use Group Policy to enforce the setting
- Press
Win + R, typegpedit.msc, and pressEnter. - Go to: Computer Configuration > Administrative Templates > Windows Components > Windows PowerShell
- Double-click Turn on Script Execution.
- Set it to Enabled.
- Choose one of these options:
- Allow only signed scripts
- Allow local scripts and remote signed scripts
- Click Apply, then OK.
- This prevents users from bypassing the setting with their own per-user policy.
- Press
-
Update policy settings on the PC
- Press
Start, typecmd. - Right-click Command Prompt and choose Run as administrator.
- Run:
gpupdate /force - Restart the PC if prompted.
- Press
-
Verify that a standard user cannot loosen the policy
- Sign in with a standard user account.
- Open Windows PowerShell normally.
- Run:
Get-ExecutionPolicy -List - Confirm that
MachinePolicyorLocalMachineis enforcing the restriction. - If needed, test a script from the Downloads folder and confirm Windows blocks it if it is unsigned.
-
Reduce script abuse from common user-writeable folders
- Avoid storing approved scripts in
Downloads,Desktop, or temp folders. - Move approved scripts to a locked-down folder such as
C:\Program Files\CompanyScripts. - Adjust NTFS permissions so standard users can read scripts but not modify them.
- This helps prevent users from replacing trusted scripts with altered copies.
- Avoid storing approved scripts in
Fix It Automatically with Kudu
Kudu can help you spot risky system settings that make script abuse easier, including weak security configurations and inconsistent Windows policies. Instead of checking every machine manually, you can use Kudu to audit problem areas quickly and apply safer optimization and hardening changes with less guesswork.
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →Related guides
How to Audit User Accounts, Disable Guest, and Remove Old Users
Clean up stale accounts and disable Guest access to reduce unauthorized entry points, and use Kudu to help check account security.
How to Disable Windows Script Host to Stop Script-Based Malware
Disabling WSH can block VBS and JS malware on systems that do not need it, and Kudu can help review safe hardening steps.
Why Using a Standard User Instead of Admin Makes Windows Safer
Running daily tasks without admin rights can limit malware damage, and Kudu can help you audit risky account settings.
How to Audit Installed Programs for Unknown or Unwanted Software
Check installed apps for shady, unused, or unfamiliar software, and use Kudu to help spot programs worth removing.