-
Notifications
You must be signed in to change notification settings - Fork 7
Microsoft PowerShell 7
Your Name edited this page Mar 29, 2026
·
5 revisions
Below is a video walkthrough of the steps on this page:
OSDWorkspace Prerequisites: PowerShell 7
winget install -e --id Microsoft.PowerShell --override '/passive ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1 ADD_PATH=1'Follow the official Microsoft installation guide for the latest instructions.
To install PowerShell 7.6 using the Windows Package Manager (winget), run:
winget install -e --id Microsoft.PowerShell --override '/passive ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1 ADD_PATH=1'The --override switch allows you to customize the installation options. The following options are available:
| Option | Description | Values |
|---|---|---|
ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL |
Add "Open PowerShell" to the context menu in Windows Explorer |
1, 0
|
ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL |
Add "Run with PowerShell" to the context menu in Windows Explorer |
1, 0
|
ADD_PATH |
Add PowerShell to the Windows PATH environment variable |
1, 0
|
DISABLE_TELEMETRY |
Disable PowerShell telemetry by setting the POWERSHELL_TELEMETRY_OPTOUT environment variable |
1, 0
|
ENABLE_MU |
Opt into using Microsoft Update for Automatic Updates |
1, 0
|
ENABLE_PSREMOTING |
Enable PowerShell remoting during installation |
1, 0
|
INSTALLFOLDER |
Override the installation root directory (default: $Env:ProgramFiles\PowerShell\). The versioned subfolder name (7 or 7-preview) cannot be changed. |
path |
REGISTER_MANIFEST |
Register the Windows Event Logging manifest |
1, 0
|
USE_MU |
Opt into updating through Microsoft Update, WSUS, or Configuration Manager |
1, 0
|
Notes:
-
1= Enable/Opt-in (default for most options) -
0= Disable/Opt-out