Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Windows 10 (build 10163) required the "-Force" with the Set-ExecutionPolicy command to work #18

Closed
NNM11 opened this issue Jul 20, 2015 · 1 comment

Comments

@NNM11
Copy link

NNM11 commented Jul 20, 2015

I run Windows 10 (build 10163). The command "Set-ExecutionPolicy Unrestricted -Scope CurrentUser" did not work for the "npm-windows-upgrade" command.


Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. All rights reserved.

PS C:\WINDOWS\system32> Set-ExecutionPolicy Unrestricted -Scope CurrentUser
PS C:\WINDOWS\system32> npm-windows-upgrade
npm-windows-upgrade 0.2.6
? This tool will upgrade npm. Do you want to continue? Yes
Scripts cannot be executed on this system. <<<<<< ERROR
To fix this issue, please run the command below as Administrator and try again:

Set-ExecutionPolicy Unrestricted -Scope CurrentUser

Adding the "-Force" parameter fix the problem.
The result is below.


PS C:\Program Files (x86)\nodejs> Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
PS C:\Program Files (x86)\nodejs> npm-windows-upgrade
npm-windows-upgrade 0.2.6
? This tool will upgrade npm. Do you want to continue? Yes
? Which version do you want to install? 3.1.3
Upgrading.. -

Upgrade finished. Your new npm version is 3.1.3. Have a nice day!
PS C:\Program Files (x86)\nodejs>

@felixrieseberg
Copy link
Owner

Thanks for reporting! I've added it to the readme and the reported error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants