Install-OSDeploySoftware
List, preview, download, or install the software components used by OSDeploy.
Install-OSDeploySoftware is the entry point for preparing an OSDeploy workstation. Use it to list supported components, inspect current module metadata, download supported installers, or run one or more component installers.
Requirements
Run the command from an elevated PowerShell session on a workstation that meets all of these requirements:
Windows 11; hosts earlier than Windows 11 26H2 build 26300 warn and continue during preview
PowerShell 7.6 or later installed from the MSI package
Current OSDeploy module
curl.exeavailable inPATHInternet access for downloads and installations
Components installed through WinGet also require winget.exe, supplied by App Installer. MDT additionally requires msiexec.exe; Hyper-V requires the Windows optional-feature cmdlets.
The command checks Windows, the Windows build, PowerShell, the PowerShell installation type, curl.exe, and administrator access before it lists or previews components.
Components
Use one or more of these exact values with -Name:
adk-26h2
Windows ADK 26H2 10.1.26100.9457 and Windows PE add-on
Microsoft setup programs
Uses the setup URLs in current module metadata.
adk-26h1
Windows ADK 26H1 10.1.28000.1 and Windows PE add-on
Microsoft setup programs
Uses the setup URLs in current module metadata.
mdt
Microsoft Deployment Toolkit 6.3.8456.1000
x64 MSI
Downloads MicrosoftDeploymentToolkit_x64.msi.
git
Git for Windows
WinGet package Git.Git
The helper does not pass an architecture argument to WinGet.
code
Visual Studio Code
WinGet package Microsoft.VisualStudioCode
The helper does not pass an architecture argument to WinGet.
code-insiders
Visual Studio Code Insiders
WinGet package Microsoft.VisualStudioCode.Insiders
The helper does not pass an architecture argument to WinGet.
hyperv
Microsoft Hyper-V
Windows optional feature Microsoft-Hyper-V-All
Uses the feature available in the running Windows installation.
7zip
7-Zip
WinGet package 7zip.7zip
Downloads both x64 and arm64 installers for the OSDeploy cache.
Parameters
-Name
String[]
None
Accepts the eight component names above and the alias -Component. Omit it to list every component. A supplied name previews by default. This parameter does not accept pipeline input.
-Force
Switch
Not enabled
Runs the selected installers or enables the selected feature. Without -Force or -DownloadOnly, the command returns preview metadata.
-DownloadOnly
Switch
Not enabled
Downloads supported ADK, MDT, or 7-Zip content without installing it. When combined with -Force, download-only behavior takes precedence. Returns NotSupported for git, code, code-insiders, and hyperv.
-WhatIf
Common parameter
Not enabled
Runs the shared requirement checks and reports each requested download or installation action without invoking its component helper.
-Confirm
Common parameter
Not enabled
Prompts separately for each requested download or installation action. The command uses ConfirmImpact Medium.
Examples
List available components
Return every accepted name and its preview command without selecting a component:
Preview multiple components
Return module metadata and install commands for Windows ADK 26H2 and 7-Zip without downloading or installing them:
Install multiple components
Install Git for Windows and both Visual Studio Code channels in the supplied order:
Git installation can prompt for the current user's global Git name and email address when those values are missing.
Download supported installers
Download and verify the MDT MSI without installing MDT:
Preview an installation action with WhatIf
Run requirement checks and show the Hyper-V action without enabling the feature:
Capture action results
Install Windows ADK 26H2 and 7-Zip, then inspect the parent command's component status objects:
Action Behavior
The command selects its mode from the supplied parameters:
With no
-Name, it lists all supported components.With
-Namebut without-Forceor-DownloadOnly, it returns preview metadata from the current OSDeploy module data.With
-DownloadOnly, it downloads supported component content. This mode takes precedence when-Forceis also present.With
-Force, it invokes each selected installer or feature action in the order supplied to-Name.
The command stops on a terminating component error. Changes completed by earlier components are not rolled back. An action result with Status set to Installed means the component helper completed; it does not distinguish a new installation from an already-present component.
Component Behavior
ADK setup downloads the ADK and matching Windows PE bootstrapper. Installation adds Deployment Tools, Imaging and Configuration Designer, and Windows Preinstallation Environment. Any detected ADK version causes the requested ADK installation to be skipped.
MDT downloads an x64 MSI, validates its SHA256 hash, and installs it silently with no automatic restart. An existing MDT installation is not replaced.
Git, Visual Studio Code, and Visual Studio Code Insiders install through WinGet only when their command is not found. Git can also prompt for missing global identity values.
Hyper-V enables
Microsoft-Hyper-V-Allwith all parent features and no automatic restart. The command returnsNotSupportedinstead of invoking the helper when it detects a virtual machine.7-Zip downloads x64 and arm64 installers, installs the host application when needed, and prepares the versioned 7-Zip WinPE app cache.
See the child component guides for cache paths, verification commands, and component-specific restrictions.
WhatIf and Confirmation
Install-OSDeploySoftware calls ShouldProcess once for each selected component immediately before invoking its helper. -WhatIf still runs the shared requirement checks and writes the OSDeploy banner, but it does not download, install, enable, or cache component content. Because no helper runs, the command returns no action result for that component.
-Confirm prompts at the same boundary. Declining one component omits its result and continues to the next selected component. After accepting the parent prompt, components that implement their own ShouldProcess checks can display additional confirmation prompts for their internal changes.
Listing and preview modes do not call ShouldProcess; -WhatIf does not change their returned data.
Output
The command returns System.Management.Automation.PSCustomObject instances. The properties depend on the selected mode.
Component list
Name
Exact value accepted by -Name.
FullName
Display name of the component.
Action
Install.
Command
Preview command for the component.
Preview
Name
Selected -Name value.
Component
Display name of the component.
Action
Preview.
Source
Package ID, feature name, or download URL from current module metadata.
Docs
Primary documentation URL.
Details
Additional release, retirement, or component information URL.
Note
Explains how to install or download the component.
Command
Installation command using -Force.
Download and installation actions
Successful ADK, MDT, Git, Visual Studio Code, and 7-Zip actions return Component and Status. Status is Downloaded for download-only actions and Installed for installation actions. Hyper-V also returns RestartNeeded.
Unsupported download-only requests and Hyper-V requests inside a virtual machine return Name, Component, Action, Status, and Note; Status is NotSupported.
Start with Install Required Software for the standard workstation setup, or use the Install-OSDeploySoftware command reference for compact syntax.
Last updated
Was this helpful?

