Skip to content

Repository files navigation

OSD PowerShell Module

PowerShell GalleryPowerShell Gallery DownloadsLicense

A PowerShell module for Windows deployment, built around OSDCloud — a modern, internet-based OS deployment framework that runs entirely from WinPE.


Requirements

RequirementValue
PowerShell5.1 or later
EditionDesktop (Windows PowerShell)
OSWindows

Installation

Install from PowerShell Gallery

Install-Module-Name OSD -Force

Update to the latest version

Update-Module-Name OSD -Force

Import into the current session

Import-Module-Name OSD -Force

Check the installed version

Get-Module-Name OSD -ListAvailable |Select-Object Name, Version

Quick Start: OSDCloud

OSDCloud deploys Windows directly from the internet (or a USB cache) via WinPE. The typical workflow is:

1. Create a WinPE template

New-OSDCloudTemplate-Name "OSDCloudWinPE"

2. Create a workspace and USB drive

$OSDCloudWorkspace="C:\OSDCloudWinPE"New-OSDCloudWorkspace-WorkspacePath $OSDCloudWorkspaceNew-OSDCloudUSB

3. Optionally customize WinPE

# Add a PowerShell module into WinPE (e.g., HPCMSL for HP devices)Edit-OSDCloudWinPE-PSModuleInstall HPCMSL
# Add 7-Zip support for extracting HP softpaqs in WinPEEdit-OSDCloudWinPE-Add7Zip

4. Boot and deploy

Boot from the OSDCloud USB drive. From WinPE, launch the deployment:

# GUI (recommended for interactive deployments)Start-OSDCloudGUI# Command lineStart-OSDCloud-OSName "Windows 11 24H2 x64"-OSEdition Pro

Key Features & Function Groups

OSDCloud Deployment

FunctionDescription
Start-OSDCloudCore deployment engine — downloads and installs Windows from the internet
Start-OSDCloudGUIInteractive GUI for selecting OS, language, and edition
Start-OSDCloudGUIDevDeveloper/testing GUI with additional HP, SetupComplete, and debug options
Start-OSDCloudCLINon-interactive command-line deployment
Invoke-OSDCloudInvokes OSDCloud after variables are set
Invoke-OSDCloudIPUIn-Place Upgrade using OSDCloud

Template & Workspace Management

FunctionDescription
New-OSDCloudTemplateCreates a new WinPE template using the installed Windows ADK
New-OSDCloudWorkspaceCreates a new OSDCloud workspace from a template
Edit-OSDCloudWinPECustomizes the WinPE boot image (modules, drivers, 7-Zip, etc.)
New-OSDCloudUSBCreates a bootable OSDCloud USB drive
Update-OSDCloudUSBUpdates an existing OSDCloud USB drive
Get-OSDCloudTemplateReturns the current OSDCloud template
Set-OSDCloudTemplateSets the active OSDCloud template

Driver Packs

FunctionDescription
Get-MyDriverPackDetects and returns the appropriate driver pack for the current device
Save-MyDriverPackDownloads the driver pack for the current device
Get-HPDriverPackLatestGets the latest HP driver pack for a given platform
Get-DellDriverPackCatalogReturns the Dell driver pack catalog
Get-LenovoDriverPackCatalogReturns the Lenovo driver pack catalog
Get-SurfaceDriverPackCatalogReturns the Surface driver pack catalog

HP Device Management

FunctionDescription
Get-HPTPMDetermineDetects the required HP TPM firmware update package (SP87753 / SP94937)
Invoke-HPTPMEXEDownloadDownloads the required HP TPM firmware to C:\OSDCloud\HP\TPM
Invoke-HPTPMEXEInstallExtracts and installs the staged HP TPM firmware via TPMConfig64.exe
Invoke-HPTPMDowngradeDowngrades an Infineon TPM from firmware 2.0 to 1.2
Install-HPIAInstalls HP Image Assistant
Invoke-HPIARuns HP Image Assistant to update drivers, firmware, BIOS, and software
Install-ModuleHPCMSLInstalls the HP Client Management Script Library (HPCMSL)
Get-HPSoftpaqListLatestReturns the latest HP softpaq list for a platform

Windows Image Servicing

FunctionDescription
Edit-MyWindowsImageMounts and services a Windows image offline
Mount-MyWindowsImageMounts a WIM/FFU for offline servicing
Dismount-MyWindowsImageDismounts a mounted Windows image
Copy-PSModuleToWindowsImageInjects a PowerShell module into an offline Windows image
Add-WindowsPackageSSUAdds a Servicing Stack Update to a Windows image
Update-MyWindowsImageApplies cumulative updates to a mounted Windows image

Disk & Volume Management

FunctionDescription
Get-LocalDiskReturns local fixed disks
Clear-LocalDiskClears all partitions from a local disk
Get-USBDiskReturns connected USB disks
Clear-USBDiskClears all partitions from a USB disk
New-OSDiskCreates a new OSD-formatted disk layout
Backup-DiskToFFUCaptures a disk to a Full Flash Update (FFU) image
Invoke-SelectLocalDiskInteractive disk selection UI

Microsoft Update Catalog

FunctionDescription
Get-MsUpCatQueries the Microsoft Update Catalog
Get-MsUpCatUpdateReturns update metadata from the MS Update Catalog
Save-MsUpCatDriverDownloads a driver update from the MS Update Catalog
Save-MsUpCatUpdateDownloads an update package from the MS Update Catalog

OOBE & SetupComplete

FunctionDescription
Invoke-oobeUpdateWindowsRuns Windows Update during OOBE
Invoke-oobeUpdateDriversRuns driver updates during OOBE
Invoke-oobeAddNetFX3Adds .NET Framework 3.5 during OOBE
Invoke-oobeAddRSATAdds RSAT tools during OOBE
New-OSDCloudUSBSetupCompleteTemplateCreates SetupComplete script templates on OSDCloud USB
New-OSDCloudWorkspaceSetupCompleteTemplateCreates SetupComplete script templates in the workspace

WinRE & WiFi

FunctionDescription
Connect-WinREWiFiConnects to WiFi from WinRE/WinPE
Connect-WinREWiFiByXMLProfileConnects to WiFi using an XML profile from WinRE/WinPE
Get-WinREWiFiReturns available WiFi networks from WinRE
Set-WinREWiFiConfigures WiFi in WinRE

Azure

FunctionDescription
Connect-OSDCloudAzureAuthenticates to Azure for OSDCloud
Get-AzOSDCloudReturns Azure OSDCloud resources
Get-CloudSecretRetrieves a secret from Azure Key Vault
Set-CloudSecretSaves a secret to Azure Key Vault

Useful Commands

# List all exported functionsGet-Command-Module OSD
# List all HP-related functionsGet-Command-Module OSD |Where-Object { $_.Name-match'-HP' }
# List all OSDCloud-related functionsGet-Command-Module OSD |Where-Object { $_.Name-match'OSDCloud' }
# Get help for a specific functionGet-HelpStart-OSDCloud-Full
Get-HelpNew-OSDCloudTemplate-Examples

Links

About

PowerShell Module OSD

Topics

Resources

Code of conduct

Stars

245 stars

Watchers

22 watching

Forks

Used by

Contributors

Languages