Post

OSDCloud v2 — Getting Started

OSDCloud v2 — Getting Started

OSDCloud v2 — Getting Started

I finally spent some time trying out OSDCloud v2 (via the OSD.Workspace project) and wanted to write down the minimal, practical steps I used to get up and running.

This post is a hands-on “get started” guide: The prerequisites.

Note: the project docs are here: https://github.com/OSDeploy/OSD.Workspace/wiki — I’ll link the specific pages where useful, but you should read the wiki for full context and the latest changes.

What is OSDCloud v2

OSDCloud v2 (OSD.Workspace) is the community-driven PowerShell project used to build and deploy Windows opperating systems. It’s designed to help automate creating deployment artifacts you can use with PXE, WDS, or USB drives.

Prerequisites

  • Windows 11 24H2
  • Git for Windows
  • PowerShell 7
  • Windows ADK + WinPE Add-on
  • Microsoft Deployment Toolkit (MDT) if you use MDT workflows.
  • An elevated (Administrator) PowerShell terminal to run install steps.

The OSD.Workspace wiki lists a Recommended Client Configuration — follow that page if you want an exact checklist: https://github.com/OSDeploy/OSD.Workspace/wiki#recommended-client-configuration

Install / Prerequisite steps

Open an elevated PowerShell session and run the commands below.

  1. Set the execution policy for this session and ensure TLS 1.2 is enabled (some gallery operations need it):
1
2
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
  1. Install the NuGet Package Provider
1
2
3
if ($(Get-PackageProvider).Name -notcontains 'NuGet') {
    Install-PackageProvider -Name NuGet -Force -Verbose
}
  1. Tuest the PowerShell Gallery
1
2
3
4
5
6
if ((Get-PSRepository -Name 'PSGallery').InstallationPolicy -ne 'Trusted') {
    Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
    Write-Host "PowerShell Gallery (PSGallery) has been set to Trusted."
} else {
    Write-Host "PowerShell Gallery (PSGallery) is already Trusted."
}
  1. Update PowerShellGet
1
Install-Module -Name PowerShellGet -Force -Scope AllUsers -AllowClobber -SkipPublisherCheck -Verbose
  1. Update PackageManagement
    1
    
    Install-Module -Name PackageManagement -Force -Scope AllUsers -AllowClobber -SkipPublisherCheck -Verbose
    
  2. Install PowerShell 7
    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'
    
  3. Install Git for Windows
    1
    
    winget install --id Git.Git -e -h
    
  4. Configure Git for Windows
    1
    2
    3
    4
    
    # Set user email
    git config --global user.email "[email protected]"
    # Set user name
    git config --global user.name "Your Name"
    
  5. Install VSCode Insiders
    1
    
    winget install -e --id Microsoft.VisualStudioCode.Insiders --override '/SILENT /mergetasks="!runcode,addcontextmenufiles,addcontextmenufolders,associatewithfiles,addtopath"'
    

Post-Installation Steps

  • Launch Visual Studio Code from the Start Menu or by typing code in a new terminal window.
  • Sign in with your Microsoft or GitHub account to sync settings and extensions (optional).
  • Install recommended extensions for your workflow (e.g., PowerShell, Python, GitLens, etc.).
  • Configure settings by navigating to File > Preferences > Settings or pressing Ctrl+,.
  • Update regularly to receive the latest features and security updates.
  1. Install the Windows ADK and the WinPE Add-on
1
2
3
4
5
6
7
8
9
10
11
12
13
# Windows ADK Setup
$Url = 'https://go.microsoft.com/fwlink/?linkid=2289980'
Invoke-Expression "& curl.exe --insecure --location --output `"$env:TEMP\adksetup.exe`" --url `"$Url`""
Start-Process -FilePath "$env:TEMP\adksetup.exe" -ArgumentList '/features', 'OptionId.DeploymentTools', 'OptionId.ImagingAndConfigurationDesigner', '/quiet', '/ceip', 'off', '/norestart' -Wait

# Windows PE add-on for the Windows ADK Setup
$Url = 'https://go.microsoft.com/fwlink/?linkid=2289981'
Invoke-Expression "& curl.exe --insecure --location --output `"$env:TEMP\adkwinpesetup.exe`" --url `"$Url`""
Start-Process -FilePath "$env:TEMP\adkwinpesetup.exe" -ArgumentList '/features', 'OptionId.WindowsPreinstallationEnvironment', '/quiet', '/ceip', 'off', '/norestart' -Wait

# MDT Windows PE x86 MMC snap-in error
$path = 'C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\x86\WinPE_OCs'
New-Item -Path $path -ItemType Directory -Force | Out-Null
  1. Install MDT
    1
    
    winget install --id Microsoft.DeploymentToolkit -e --accept-source-agreements --accept-package-agreements
    
  2. Install the modules ```powershell

    The OSDWorkspace PowerShell Module

    Install-Module -Name OSD.Workspace -SkipPublisherCheck

Required for creating OSDWorkspace help files

Install-Module -Name platyPS -SkipPublisherCheck

Used in some of the OSDWorkspace functions

Install-Module -Name OSD -SkipPublisherCheck

Optionally used in some of the OSDWorkspace Gallery functions

Install-Module -Name OSDCloud -SkipPublisherCheck

1
2
3
4
5
6
7
8

## Create the OSD Workspace

Open an elevated PowerShell 7 terminal, and run this command to create the workspace

```powershell
New-OSDWorkspace

This will create a new folder on your C: drive called C:\OSDWorkspace

  • Open this folder in VSCode and watch the lower right corner of VSCode. It will ask you if you would like to open the workspace associated with the folder.

Next posts I plan to write in this series

  • Building a reproducible boot.wim with OSDCloud v2.
  • PXE/WDS integration and sample WDS configuration.
  • Packaging drivers and third-party tools into the workspace.
This post is licensed under CC BY 4.0 by the author.