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 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 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 Deployment share using PowerShell
https://deploymentresearch.com/Research/tabid/62/EntryId/102/Creating-the-MDT-2012-2013-Deployment-share-using-PowerShell.aspx
Configuring a MDT 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:

Now, I wanted to configure the settings of my deployment share. To do that you use the Set-ItemProperty, like this:
# 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:\MDTProductionDS"
#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.

If you want to enumerate the settings, you can use the Get-ItemProperty.
New-PSDrive -Name "DS002" -PSProvider MDTProvider -Root "C:\MDTProductionDS"
Get-ItemProperty DS002:
You can of course also create an object and use that:
$MDTSettings = Get-ItemProperty DS002:
$MDTSettings | Select *

/ Johan
Hi
Old post but want to know if you have any luck to change the text in “General” tab on MEDIA.
“Generate a Lite Touch bootable ISO Image” – ISOName: xyz.iso
I know you can do this with Create, but not UPDATE the value:
New-Item -Path “DS001:\Media” -Enable “True” -Name “MEDIA001” -ISOName “XYZ.iso”
Hi Dan,
Nothing I've tried I'm afraid.
I'd be honored 🙂
Nice script, would you mind if I created a separate post with that script? With proper credits of course?
/ Johan
I wrote a script to dump the apps and drivers from my share to a CSV, just to get a flat view of everything I have and where it is. # === begin ===Add-PSSnapIn Microsoft.BDD.PSSnapIn New-PSDrive -Name MyDrive -PSProvider mdtprovider -Root d:DEPLOYMENT01 get-childitem 'MyDrive:Out-of-Box Drivers' -recurse | select name, class, @{n="OS-string";e={($_ | select -expa OSVersion) -join ',' }}, @{n="Platform-string";e={($_ | select -expa Platform) -join ',' }}, NodeType, guid, PSParentPath | export-csv c:mdtDrivers.csv -NoTypeInformation get-childitem MyDrive:APPLICATIONS -recurse | select pschildname, commandline, workingdirectory, enable, CreatedTime, LastModifiedTime, guid | export-csv c:mdtapps.csv -NoTypeInformation Remove-MDTPersistentDrive MyDrive remove-PSSnapIn Microsoft.BDD.PSSnapIn Write "Export complete to c:mdtDrivers.csv and c:mdtapps.csv"… Read more »
Great thanks!
Hi Rens
From the example in this guide, simply type dir DS002: once you created the PSDrive.
/ Johan
Hi Johan,
Very great and usefull post, I'm fiddling with PowerShell and MDT myself too, but do you perhaps know how I can LIST / DIR the MDT PSDrive? Or is that not possible?
I just wanted to see the MDT directory/folder structure in powershell
Thanks
Cheers! Rens