# Easy Setup

Use the Install-OSDWorkspace function to quickly set up your machine with the necessary Pre-Req.

This still requires some manual steps, but will make most of the process easier.

# Set Execution Policy

Use the below command to set the execution policy to RemoteSigned if it is not already set. Bypass will work too if you are feeling risky.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force

Set Execution Policy
Set Execution Policy

# Install PowerShell 7.5+

OSD.Workspace requires PowerShell 7.5 or later. Lets install it using winget and then we can run the Install-OSDWorkspace function.

Use the below command will install PowerShell 7 and add it to the context menu for folders and files.

# Install PowerShell 7.5
winget install -e --id Microsoft.PowerShell --override '/Passive ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ADD_PATH=1'

Install PowerShell 7.5 using winget
Install PowerShell 7.5 using winget

# Install OSD.Workspace

Start a new PowerShell 7.5 session as administrator and install the OSD.Workspace module.

Install-Module -Name OSD.Workspace

Install OSD.Workspace
Install OSD.Workspace

# Run Install-OSDWorkspace

Run the Install-OSDWorkspace function.

Install-OSDWorkspace

The function will start to setup OSDWorkspace.

Run Install-OSDWorkspace
Run Install-OSDWorkspace

# PowerShell 7.5

Assuming you don't have any of the necessary pre-reqs installed, you should receive a warning that Visual Studio Code is not installed.

Visual Studio Code Warning
Visual Studio Code Warning

The winget command to install Visual Studio Code will be copied to your clipboard.

Paste the command into your PowerShell session to install Visual Studio Code.

Paste Visual Studio Code winget command
Paste Visual Studio Code winget command

View the full process:

Run Install-OSDWorkspace
Run Install-OSDWorkspace

# Git for Windows

Run the Install-OSDWorkspace function again.

This time you should receive a warning that Git for Windows is not installed.

Git for Windows Warning
Git for Windows Warning

Just like before, the winget command to install Git for Windows will be copied to your clipboard.

Paste the command into your PowerShell session to install Git for Windows.

Paste Git for Windows winget command
Paste Git for Windows winget command

View the full process:

Run Install-OSDWorkspace
Run Install-OSDWorkspace

# Install-OSDWorkspace One More Time

Run the Install-OSDWorkspace function one more time to finish the OSDWorkspace setup.

Install-OSDWorkspace Sucess
Install-OSDWorkspace Sucess

# Install Windows ADK

Microsoft Windows ADK is used for the Windows PE creation process and the optional components are required. These instructions are for the 24H2 version of the ADK. If you are using a different version, you may need to adjust the instructions accordingly.

# Microsoft Windows ADK

Use the below command to install the Windows ADK using winget.

winget install --id Microsoft.WindowsADK -e --accept-source-agreements --accept-package-agreements --wait --override '/features OptionId.DeploymentTools /quiet /ceip off /norestart'

Copy and paste the above command into your PowerShell session to install the Windows ADK.

Install Windows ADK
Install Windows ADK

# Microsoft Windows ADK WinPE Addon

For some reason Microsoft does not show this in winget anymore, so this will have to do.

$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

Copy and paste the above command into your PowerShell session to download and install the Windows ADK WinPE Addon. This can take a while as the install has to download the required files which are ~3GB.

Install Windows ADK WinPE Addon
Install Windows ADK WinPE Addon

# Ready to Go

You should now be ready to start using OSDWorkspace.