For the complete documentation index, see llms.txt. This page is also available as Markdown.

Install PowerShell 7

OSDeploy requires PowerShell 7.6 or later. PowerShell 7 installs side-by-side with Windows PowerShell 5.1 and does not replace it. It is installed to $env:ProgramFiles\PowerShell\7 and launched using pwsh.

These instructions target Windows only (amd64 and arm64). The snippets detect the current architecture automatically.

PowerShell releases frequently. Always check the PowerShell GitHub Releases page for the current version and update the $Version variable accordingly.

Why Not WinGet?

Beginning with PowerShell 7.6.0, WinGet installs the MSIX package by default. MSIX packages run inside an application sandbox that virtualizes filesystem and registry access. This sandbox blocks system-level operations, including commands that call dism.exe. This makes MSIX-based installations incompatible with OSD workflows such as OSDCloud.

Download the MSI

The following snippet detects the system architecture, creates the download directory, and saves the installer to $env:ProgramData\OSDeployCore\software\Microsoft.PowerShell.

curl.exe is used for downloads — it is faster and more reliable than Invoke-WebRequest in Windows system contexts.

Install the MSI

The following snippet silently installs the MSI with all recommended options enabled. Source: Install the MSI package with command-line options.

After Installation

PowerShell 7 is installed to $env:ProgramFiles\PowerShell\7. Launch it from the Start Menu or by running pwsh in any terminal. The installer adds pwsh to the system PATH automatically when ADD_PATH=1 is set.

To verify the installation:

Last updated

Was this helpful?