Your PowerShell scripts won’t run and Task Scheduler refuses to trigger them? I’ve seen this happen when the execution policy is too restrictive. Here’s the fastest way to fix it.
Quick Fix: Run Set-ExecutionPolicy RemoteSigned -Scope CurrentUser in PowerShell as Administrator. Confirm with Y. Then try .\yourScript.ps1 again.
What’s causing this issue?
PowerShell blocks unsigned scripts by default for security. Even in 2026, the default policy remains “Restricted,” which stops all scripts from running. Admins face this too—PowerShell won’t execute .ps1 files until you change the policy to “RemoteSigned” or “Unrestricted.”
How do you fix it step by step?
Open PowerShell as Administrator.
Hit Win + X, then select Windows Terminal (Admin) or PowerShell (Admin).
Check your current policy.
Type:
Get-ExecutionPolicyIf it shows
Restricted, you’ll need to adjust it.Switch to RemoteSigned (lets local scripts run; downloaded ones need signatures).
Run:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserType
Yand press Enter to confirm.Double-check the change:
Get-ExecutionPolicyYou should now see
RemoteSigned.Run your script.
Head to your script folder:
cd C:\ScriptsExecute it:
.\yourScript.ps1
Still not working? Try these troubleshooting steps
Bypass temporarily: Run
powershell -ExecutionPolicy Bypass -File "C:\Scripts\yourScript.ps1"from Command Prompt to test once.Unblock the file: If you downloaded it from the internet, right-click the file → Properties → check Unblock → Apply → OK.
Check your PowerShell version: Run
$PSVersionTable.PSVersion. Anything below 5.1? Upgrade via PowerShell install page. Older versions handle execution policies poorly.
How can you prevent this from happening again?
Keep execution policy consistent: Set
RemoteSignedin Group Policy for enterprise machines (gpedit.msc→ Computer Configuration → Administrative Templates → Windows Components → Windows PowerShell → Turn on Script Execution → Enabled → “Allow local scripts and remote signed scripts”).Sign your scripts: Use
Set-AuthenticodeSignatureto sign scripts before sharing them. This keeps others from hitting the same policy wall.Use profiles to enforce policies: Add a logon script that runs
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Forceif you manage multiple users.