Free tools Windows power users keep installed
One-click scans. No signup required.
If PowerShell reports that npm.ps1 cannot be loaded because running scripts is disabled, it is blocking npm’s PowerShell launcher before npm starts. On a personal Windows PC where you are allowed to change the setting, the usual persistent, per-user remedy is Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser. First check the effective policy and its scope; on a work- or school-managed computer, an administrator’s policy may take precedence.
What the npm execution policy error means
PowerShell execution policy controls the conditions under which PowerShell loads configuration files and runs scripts. If the error identifies npm.ps1, PowerShell is reporting that it blocked a PowerShell script launcher; that does not by itself mean npm is broken or missing. The block can happen before npm gets a chance to run.
Microsoft describes execution policy as a safety feature and a defense-in-depth measure, not a security boundary. A policy setting should not be treated as proof that a script is safe: even signed scripts can be malicious. Execution-policy enforcement applies on Windows; on non-Windows systems, PowerShell’s reported policy does not operate as a Windows script restriction. See Microsoft’s about_Execution_Policies.
Diagnose the policy in the terminal that fails
-
Identify which PowerShell edition you are using. Windows PowerShell runs as
powershell.exe; PowerShell 7 and later run aspwsh.exe. Their execution-policy settings are managed separately, so a setting for one does not automatically change the other.Recommended Free Tools
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.#1 Best Overall
Amazon Basics Wired QWERTY Keyboard, Works with Windows, Plug and Play, Easy to Use with Media Control, Full-Sized, Black- KEYBOARD: The keyboard works for Windows with hot keys that enable easy access to Media, My Computer, Mute, Volume up/down, and Calculator
- EASY SETUP: Experience simple installation with the USB wired connection
- VERSATILE COMPATIBILITY: This keyboard is designed to work with multiple Windows versions, including Vista, 7, 8, 10 offering broad compatibility across devices.
- SLEEK DESIGN: The elegant black color of the wired keyboard complements your tech and decor, adding a stylish and cohesive look to any setup without sacrificing function.
- FULL-SIZED CONVENIENCE: The standard QWERTY layout of this keyboard set offers a familiar typing experience, ideal for both professional tasks and personal use.
-
In that same terminal, run:
Get-ExecutionPolicy Get-ExecutionPolicy -ListThe first command reports the effective policy. The second lists the
MachinePolicy,UserPolicy,Process,CurrentUser, andLocalMachinescopes. Microsoft documents the edition distinction and policy scopes in about_Execution_Policies and Set-ExecutionPolicy. -
Check whether
MachinePolicyorUserPolicyis set. Group Policy takes precedence over local settings. A local command can succeed without changing the effective policy if an organizational policy overrides it.Rank #2
SaleLogitech MK270 Full Size Wireless Keyboard and Mouse Combo - Black- Reliable Plug and Play: The USB receiver provides a reliable wireless connection up to 33 ft (1), so you can forget about drop-outs and delays and you can take it wherever you use your computer
- Type in Comfort: The design of this keyboard creates a comfortable typing experience thanks to the low-profile, quiet keys and standard layout with full-size F-keys, number pad, and arrow keys
- Durable and Resilient: This full-size wireless keyboard features a spill-resistant design (2), durable keys and sturdy tilt legs with adjustable height
- Long Battery Life: MK270 combo features a 36-month keyboard and 12-month mouse battery life (3), along with on/off switches allowing you to go months without the hassle of changing batteries
- Easy to Use: This wireless keyboard and mouse combo features 8 multimedia hotkeys for instant access to the Internet, email, play/pause, and volume so you can easily check out your favorite sites
Choose the least disruptive option that fits
| Option | Command or action | Scope and persistence |
|---|---|---|
| Temporary PowerShell policy change | Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process |
Applies to this PowerShell process and its child processes. It is discarded when the session closes and does not override Group Policy. |
| Per-user PowerShell policy change | Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser |
Applies to the current user rather than all users of the computer and remains in effect until changed, unless a higher-precedence policy applies. |
| Explicit command launcher | Try npm.cmd with the same arguments, for example npm.cmd install. |
Invokes the .cmd launcher if it is installed and available on PATH; it does not change PowerShell’s execution policy. |
| npm package-script shell setting | npm’s script-shell configuration |
Controls the shell used for commands run by npm package scripts, such as npm run; it is not the usual fix for PowerShell blocking the interactive npm launcher before npm starts. |
For a one-session test
If you want to test a policy change without making it persist for your user account, run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process in the PowerShell session that reports the error. It affects that process and its child processes and ends when the session closes. It cannot override Group Policy. Afterward, check the result with Get-ExecutionPolicy. Microsoft documents this scope in about_Execution_Policies.
For a persistent per-user setting on a personal PC
If the computer is not centrally managed and you are permitted to change the policy, run:
Rank #3
- All-day Comfort: The design of this standard keyboard creates a comfortable typing experience thanks to the deep-profile keys and full-size standard layout with F-keys and number pad
- Easy to Set-up and Use: Set-up couldn't be easier, you simply plug in this corded keyboard via USB on your desktop or laptop and start using right away without any software installation
- Compatibility: This full-size keyboard is compatible with Windows 7, 8, 10 or later, plus it's a reliable and durable partner for your desk at home, or at work
- Spill-proof: This durable keyboard features a spill-resistant design (1), anti-fade keys and sturdy tilt legs with adjustable height, meaning this keyboard is built to last
- Plastic parts in K120 include 51% certified post-consumer recycled plastic*
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Then verify the effective setting:
Get-ExecutionPolicy
With RemoteSigned, local scripts can run without signatures, while scripts marked as downloaded from the internet generally need a trusted signature unless they have been unblocked. This is a scoped PowerShell policy change for the current user, not a guarantee that scripts are harmless. Microsoft’s Set-ExecutionPolicy documentation describes the setting and its scope.
As a launcher workaround
If an installed npm.cmd is available on your PATH, try it in place of npm, keeping the same arguments—for example, npm.cmd install. This may avoid the blocked PowerShell script launcher without changing execution policy. It is a practical workaround, not a documented fix for this exact error: npm’s documentation describes .cmd shims for package executables, but does not specifically confirm interactive npm.cmd resolution as a remedy for an npm.ps1 policy block. The npm Scripts documentation covers package-script shell behavior.
Rank #4
- Fluid Typing Experience: Laptop-like profile with spherically-dished keys shaped for your fingertips delivers a fast, fluid, precise and quieter typing experience
- Automate Repetitive Tasks: Easily create and share time-saving Smart Actions shortcuts to perform multiple actions with a single keystroke with the Logi Options+ app (1)
- Smarter Illumination: Backlit keyboard keys light up as your hands approach and adapt to the environment; Now with more lighting customizations on Logi Options+ (1)
- More Comfort, Deeper Focus: Work for longer with a solid build, low-profile design and an optimum keyboard angle that is better for your wrist posture
- Multi-Device, Multi OS Bluetooth Keyboard: Pair with up to 3 devices on nearly any operating system (Windows, macOS, Linux, Googlebook OS) via Bluetooth Low Energy or included Logi Bolt USB receiver (2)
If a managed policy overrides your change
If Get-ExecutionPolicy -List shows a setting for MachinePolicy or UserPolicy, or your effective policy does not change after a local setting, do not keep trying stronger local commands. Group Policy overrides local execution-policy settings. On a work- or school-managed device, contact your administrator or use an approved terminal or workflow.
Keep this separate from npm’s package-script shell
The script-shell setting concerns commands run by npm package scripts, including npm run. npm documents that package scripts use cmd.exe on Windows by default and that script-shell can control the shell. That is distinct from PowerShell blocking the interactive npm launcher before npm starts; changing script-shell is therefore not ordinarily relevant to this error. See npm’s Scripts documentation.
Best Value
- All-day Comfort: This USB keyboard creates a comfortable and familiar typing experience thanks to the deep-profile keys and standard full-size layout with all F-keys, number pad and arrow keys
- Built to Last: The spill-proof (2) design and durable print characters keep you on track for years to come despite any on-the-job mishaps; it’s a reliable partner for your desk at home, or at work
- Long-lasting Battery Life: A 24-month battery life (4) means you can go for 2 years without the hassle of changing batteries of your wireless full-size keyboard
- Simply plug the USB receiver into a USB port on your desktop, laptop or netbook computer and start using the keyboard right away without any software installation
- Simply Wireless: Forget about drop-outs and delays thanks to a strong, reliable wireless connection with up to 33 ft range (5); K270 is compatible with Windows 7, 8, 10 or later
When to use Unblock-File
Microsoft documents Unblock-File <path> as an option for a specific downloaded script that you have inspected and trust. Read and verify that file first. This is not a general remedy for the npm launcher error; it addresses a particular file marked as downloaded, rather than changing the execution policy for npm as a whole. See Microsoft’s Set-ExecutionPolicy example.
Quick Recap
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.

