Microsoft PowerShell 7 - OSDeploy/OSD.Workspace GitHub Wiki

Quick Setup (from PowerShell 5.1)

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'

Install PowerShell 7.5

Follow the official Microsoft installation guide for the latest instructions.

To install PowerShell 7.5 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'

Override Switches

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
ENABLE_MU Opt into using Microsoft Update for Automatic Updates 1, 0
ENABLE_PSREMOTING Enable PowerShell remoting during installation 1, 0
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