Setting up WDS PowerShell is a straightforward process if you know the commands. In this post, we'll see how to get WDS set up with PowerShell and provide all of the code necessary to do so.
Installing the WDS Windows Feature
Let's start by installing the windows feature, WDS-Deployment, on our soon-to-be WDS server. Be sure to include the management tools to get the WDS MMC and PowerShell module.
We can see the command completed successfully, and a reboot is not required.
Initializing the WDS Server
Now that we have the WDS-Deployment Windows feature installed, we now have access to the wdsutil command line utility. We'll use this to initialize the server. To do so, specify where you would like your remote install to be. Best practice is to use a separate partition. I am placing the command output in a variable because it can spew out some unhelpful warnings.
$wdsUtilResults = wdsutil /initialize-server /remInst:"E:\remInstall" $wdsUtilResults | select -last 1
Just ensure that the last line says, The command completed successfully and you know your WDS server is up and running.
Adding the WDS Boot Image
Next, we need to add a boot image and at least one install image before we can really do anything with it, so let's import the boot.wim. I will specify the path to the Windows 10 ISO mounted on our WDS server. This can take 30 seconds or so to import. We're getting closer to setting up WDS PowerShell!
Next, we will import the install image. This is the image that will actually be deployable after we are done. We should create an image group to store it in. This can be named whatever you want, but you will want to logically group your images somehow. I will call my group desktops.
A WIM on an install media can have several images on it. We can use the
Get-WindowsImage command to list the images.
Get-WindowsImage -imagePath "D:\sources\install.wim" | select Imagename
Then use the image name we want to import with the
$imageName = 'Windows 10 Pro' Import-WdsInstallImage -ImageGroup "desktops" -Path "D:\sources\install.wim" -ImageName $imageName
This import will take much longer because it's a full operating system image. At this point, our WDS server is ready to test. You can either configure PXE boot or create and use a discovery image to test. I'll boot to an image I already have made on our test machine.
After our discovery media boots, we can select our language and type our administrative password.
Our WDS server is now set up and ready to go!
The content of this post is originally found in video format on techsnips.io by contributor Eric Stevens. The video transcription has been edited for clarity in written form. Be sure to check out all of Eric's other videos as well as hundreds of other how-to screencasts on techsnips.io!
Join the Jar Tippers on Patreon
It takes a lot of time to write detailed blog posts like this one. In a single-income family, this blog is one way I depend on to keep the lights on. I'd be eternally grateful if you could become a Patreon patron today!Become a Patron!
Subscribe to Adam the Automator
Get the latest posts delivered right to your inbox