You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-Before updating PowerShellGet, you should always install the latest Nuget provider. To do that,
23
-
run the following in an elevated PowerShell session.
18
+
Before updating **PowerShellGet**, you should always install the latest **NuGet** provider. From an
19
+
elevated PowerShell session, run the following command.
24
20
25
-
```powershell
26
-
Install-PackageProvider Nuget -Force
27
-
Exit
28
-
```
21
+
```powershell
22
+
Install-PackageProvider -Name NuGet -Force
23
+
Exit
24
+
```
29
25
30
26
### For systems with PowerShell 5.0 (or newer) you can install the latest PowerShellGet
31
27
32
-
- To do this on Windows 10, Windows Server 2016, any system with WMF 5.0 or 5.1 installed, or any system with PowerShell 6, run the following commands from an elevated PowerShell session.
28
+
To install PowerShellGet on Windows 10, Windows Server 2016, any system with WMF 5.0 or 5.1
29
+
installed, or any system with PowerShell 6, run the following commands from an elevated PowerShell
30
+
session.
33
31
34
-
```powershell
35
-
Install-Module -Name PowerShellGet -Force
36
-
Exit
37
-
```
32
+
```powershell
33
+
Install-Module -Name PowerShellGet -Force
34
+
Exit
35
+
```
38
36
39
-
-Use `Update-Module` to get newer versions.
37
+
Use `Update-Module` to get newer versions.
40
38
41
-
```powershell
42
-
Update-Module -Name PowerShellGet
43
-
Exit
44
-
```
39
+
```powershell
40
+
Update-Module -Name PowerShellGet
41
+
Exit
42
+
```
45
43
46
-
### For systems running PowerShell 3 or PowerShell 4, that have installed the [PackageManagement MSI](https://www.microsoft.com/download/details.aspx?id=51451)
44
+
### For systems running PowerShell 3 or PowerShell 4, that have installed the PackageManagement Preview
47
45
48
-
- Use below PowerShellGet cmdlet from an elevated PowerShell sessionto save the modules to a local directory
46
+
1. From an elevated PowerShell session, use `Save-Module`to save the modules to a local directory.
- Ensure that PowerShellGet and PackageManagement modules are not loaded in any other processes.
56
-
- Delete contents of `$env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\` and `$env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\` folders.
57
-
- Re-open the PS Console with elevated permissions then run the following commands.
53
+
1. Ensure that the **PowerShellGet** and **PackageManagement** modules aren't loaded in any other
54
+
processes.
55
+
1. Delete the contents of the folders: `$env:ProgramFiles\WindowsPowerShell\Modules\PowerShellGet\`
56
+
and `$env:ProgramFiles\WindowsPowerShell\Modules\PackageManagement\`.
57
+
1. Reopen the PowerShell console with elevated permissions and run the following commands.
0 commit comments