October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk2 min

How to Check and Set PowerShell Execution Policy for One Session or User

Use Get-ExecutionPolicy to check the active policy, then choose Process for a temporary session change or CurrentUser for a setting that persists for your account.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run Get-ExecutionPolicy to see the effective policy in the current PowerShell session, or Get-ExecutionPolicy -List to inspect every scope. To change it temporarily, set -Scope Process; to make a setting for your account, use -Scope CurrentUser. Choose a policy value appropriate to your situation rather than assuming RemoteSigned is always right.

Check the effective policy and its scopes

In the PowerShell window you want to check, run:

Get-ExecutionPolicy

This returns the effective policy for that session. To see the individual scope settings and diagnose why a policy is effective, run:

As an Amazon Associate I earn from qualifying purchases.

Get-ExecutionPolicy -List

The list includes MachinePolicy, UserPolicy, Process, CurrentUser, and LocalMachine. When no Group Policy setting applies, the local scopes take precedence in this order: Process, CurrentUser, then LocalMachine. Group Policy scopes take precedence over local settings. See Microsoft’s Get-ExecutionPolicy reference and about_Execution_Policies.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the scope that matches your goal

Scope Who or what it affects How long it lasts
Process The current PowerShell process/session Until that session closes
CurrentUser The current user Persists until changed or removed

These scope behaviors are documented in Microsoft’s Set-ExecutionPolicy reference. Use LocalMachine only when you intend to affect all users; changing it requires an elevated PowerShell session.

Set a policy for one session

In the session where the change is needed, run the following, substituting the policy value that fits your requirements:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process

A Process-scope setting applies only to that PowerShell process and is cleared when it closes. Check the result with:

Rank #2
Sale
PowerShell for Sysadmins: Workflow Automation Made Easy
  • Book - powershell for sysadmins: workflow automation made easy
  • Language: english
  • Binding: paperback
Get-ExecutionPolicy -List

Set a policy for the current user

To make a user-specific setting that remains in place until changed or removed, run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Then verify the scope and effective policy:

Get-ExecutionPolicy -List

The example uses RemoteSigned as a command pattern, not as a recommendation for every situation. Microsoft documents the available behavior and scope options in the Set-ExecutionPolicy reference.

Remove a CurrentUser setting

To remove an explicitly set policy at the CurrentUser scope, set that scope to Undefined:

Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser

If no scope defines a policy, Microsoft’s about topic says the effective policy on Windows client systems is Restricted. Other scopes may still determine the effective result, so inspect Get-ExecutionPolicy -List after removing the setting.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot a policy that will not change

If the effective policy differs from the scope you changed, check Get-ExecutionPolicy -List rather than repeatedly changing a lower-precedence scope. MachinePolicy and UserPolicy are controlled by Group Policy and cannot be changed with Set-ExecutionPolicy. If either governs the result, contact the administrator responsible for organizational policy.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Also check which PowerShell edition you are using. Windows PowerShell 5.1 (powershell.exe) and PowerShell 6 or later (pwsh.exe) store execution policy settings separately; a change in one does not affect the other. On non-Windows systems, PowerShell 6 and later reports Unrestricted and does not support changing execution policy. These platform and edition distinctions are described in Microsoft’s Set-ExecutionPolicy reference.

Do not treat execution policy as a safety check

Microsoft describes execution policy as one part of PowerShell’s security strategy, not proof that a script is safe. Read a script’s code and verify that it is safe before unblocking it or running it. Microsoft’s Get-ExecutionPolicy reference gives this caution in its Unblock-File example.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.