Configuring MDT 2013 Deployment Share settings via PowerShell

29 januari, 2014

About two weeks ago I was finishing up writing an upcoming PowerShell book together with fellow MVP Mikael Nystrom. During the book development process we ran into having to configure a MDT 2013 deployment share, and since it’s a PowerShell book, of course we wanted to do it in PowerShell. So, here is how…

Creating a MDT 2013 Deployment Share

To configure/modify a deployment share, you need to have one. I already posted an article on that part, so please use this script to create one:

Creating the MDT 2012/2013 Deployment share using PowerShell      http://www.deploymentresearch.com/Research/tabid/62/EntryId/102/Creating-the-MDT-2012-2013-Deployment-share-using-PowerShell.aspx

Configuring a MDT 2013 Deployment Share

The script in the previous section creates a deployment share in the C:\MDTProduction\DS folder. Here is how it looks when opened in Deployment Workbench:

image

Now, I wanted to configure the settings of my deployment share. To do that you use the Set-ItemProperty, like this:

1
2
3
4
5
6
7
8
9
10
11
# Connect to the MDT Production Deployment Share
Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"
new-PSDrive -Name "DS002" -PSProvider "MDTProvider" -Root "C:\MDTProduction\DS"
#Configure DeploymentShare
Set-ItemProperty -Path DS002: -Name SupportX86 -Value 'False'
Set-ItemProperty -Path DS002: -Name Boot.x64.ScratchSpace -Value '512'
Set-ItemProperty -Path DS002: -Name Boot.x64.IncludeAllDrivers -Value 'True'
Set-ItemProperty -Path DS002: -Name Boot.x64.SelectionProfile -Value 'WinPE x64'
Set-ItemProperty -Path DS002: -Name Boot.x64.LiteTouchWIMDescription -Value 'MDT Production x64'
Set-ItemProperty -Path DS002: -Name Boot.x64.LiteTouchISOName -Value 'MDT Production x64.iso'

After running the above PowerShell script, here is the updated deployment share settings.

image

If you want to enumerate the settings, you can use the Get-ItemProperty.

1
2
New-PSDrive -Name "DS002" -PSProvider MDTProvider -Root "C:\MDTProduction\DS"
Get-ItemProperty DS002:

You can of course also create an object and use that:

1
2
$MDTSettings = Get-ItemProperty DS002:
$MDTSettings | Select *

image   Result from enumerating the deployment share settings.

/ Johan Arwidmark

http://www.deploymentresearch.com/Research.aspx