Creating the MDT Reference Share
So we’ve just completed the installation of Microsoft Deployment Toolkit and are ready to create the first Deployment Share for Reference Media. Launch the DeploymentWorkbench and Right click on the ‘Deployment Shares’ drop-down and select ‘New Deployment Share’.
NOTE: This folder will hold the MSDN ISO Media and Patched WIM Files
Select a location for the Reference Folder.
Create the share name ‘ReferenceShare$‘ and click ‘Next’.
Define the Deployment Share ‘MDT Reference Share’ and click ‘Next’
Untick all the options and click ‘Next‘.
Click ‘Next‘ to provision the Reference Share.
MDT Coping Files and Folders to D:\ReferenceShare
Reference Share Completed!
Below is the PowerShell Code to auto-provision the ReferneceShare for you:
New-Item -Path "D:\ReferenceShare" -ItemType directory
New-SmbShare -Name "ReferenceShare$" -Path "D:\ReferenceShare" -FullAccess Administrators
Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"
new-PSDrive -Name "DS001" -PSProvider "MDTProvider" -Root "D:\ReferenceShare" -Description "MDT ReferenceShare" -NetworkPath "\\MDT-SERVER\ReferenceShare$" -Verbose | add-MDTPersistentDrive -Verbose
Defining the CustomSettings.ini
The CustomSettings.ini file is the brains of the MDT Share, it holds all the information required
On the right under the ‘Actions Pane’ Click ‘Properties’
Then ‘Rules’ this is what the default CustomSettings.ini looks like
[Settings]
Priority=Default
Properties=MyCustomProperty
[Default]
OSInstall=Y
SkipCapture=YES
SkipAdminPassword=YES
SkipProductKey=YES
SkipComputerBackup=YES
SkipBitLocker=YES
However this is not very useful and will not help automate the capture of the reference image – which is the end objective to this blog post.
Below is a CustomSettings.ini file i’ve crafted over the years and use for Single instance Image Captures. I have a more complex version which uses MAC Addresses for reference – another time maybe.
[Settings]
Priority=Default
[Default]
SkipTaskSequence=No
FinishAction=SHUTDOWN
OSDComputerName=%TaskSequenceID%
_SMSTSORGNAME=%TaskSequenceID%
DoCapture=Yes
ComputerBackupLocation=NETWORK
BackupShare=\\hypervlab-mdt\ReferenceShare$
BackupDir=Captures\
BackupFile=%TaskSequenceID%-Win10Enterprise1809.wim
OSInstall=Y
ApplyGPOPack=No
UserDataLocation=NONE
JoinWorkGroup=WORKGROUP
DoNotCreateExtraPartition=Yes
TimeZoneName=GMT Standard Time
KeyboardLocale=en-GB
UserLocale=en-GB
UILanguage=en-GB
SkipAdminPassword=Yes
SkipApplications=Yes
SkipAppsOnUpgrade=Yes
SkipBitLocker=Yes
SkipCapture=Yes
SkipComputerName=Yes
SkipDomainMembership=Yes
SkipFinalSummary=Yes
SkipLocaleSelection=Yes
SkipProductKey=Yes
SkipRoles=Yes
SkipSummary=Yes
SkipTimeZone=Yes
SkipUserData=Yes
SLShare=\\hypervlab-mdt\ReferenceShare$\SLSLogs
WSUSServer=http://hypervlab-mdt:8530
EventService=http://hypervlab-mdt:9800
Configure BootStrap.ini Media for Active Directory User Account
Next we need to configure the Bootstrap.ini file with Share Credentials.
To do this navigate to D:\ReferenceShare\Control\Bootstrap.ini
A Brand new vanilla Bootstrap file would look like this
We need to add the following text lines under neath the DeployRoot
UserID=svc.mdtreference
UserPassword=SuperSecurePassword1
UserDomain=ad.hypervlab.co.uk
SkipBDDWelcome=YES
So your Bootstrap.ini File should now look like.
Don’t forget to add the AD Service Account to the NTFS Security and Share Permissions – THIS HAS CAUGHT ME TO MANY TIMES
From the root of the D Drive right click on the ‘ReferenceShare’ Folder
Go to the ‘Sharing Tab’ then ‘Advanced Sharing’
Then ‘Permissions’
Add the Service Account you’ve defined (example: svc.mdtreference)
Ensure the account has Full Read/Write Access. Apply and Close.
Then under the ‘Security Tab’ go to ‘Edit’
then ‘Add’
Again ensuring that the Service Account has Full Read/Write Access to the folder and files then apply and close.
For the initial boot image creation we can select ‘Optimize the boot image updating process’. As we have no previous boot media available obliviously nothing will be optomized. we can also ignore the compression tick box and select ‘Next‘.
Click ‘Next‘
Again below is the Powershell Code you can use to Automate your Boot Image Media. This code also will add the LiteTouchPE_x64.wim to your WDS Server (If the WDS Role is isntalled on the same server.)
Optimize Boot media update process.
Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"
New-PSDrive -Name "DS001" -PSProvider MDTProvider -Root "D:\ReferenceShare"
update-MDTDeploymentShare -path "DS001:" -Verbose
wdsutil /add-image /imagefile:"D:\ReferenceShare\Boot\LiteTouchPE_x64.wim" /imagetype:boot
Regenerate Complete Boot Media.
Import-Module "C:\Program Files\Microsoft Deployment Toolkit\bin\MicrosoftDeploymentToolkit.psd1"
New-PSDrive -Name "DS001" -PSProvider MDTProvider -Root "D:\ReferenceShare"
update-MDTDeploymentShare -path "DS001:" -Force -Verbose
wdsutil /add-image /imagefile:"D:\ReferenceShare\Boot\LiteTouchPE_x64.wim" /imagetype:boot
Importing LiteTouch Boot Media into WDS
Now we have the LiteTouch ISO and WIM Files Generated they will be located under ‘D:\RefernceShare\Boot’
To Import this into Windows Deployment Service open the WDS Console and navigate to the boot folder
Click ‘Browse…’
Navigate to D:\ReferenceShare\Boot and select ‘LiteTouchPE_64.wim’
Click ‘Next’
Rename the Image Name to something more useful
Example: MDT ReferenceShare (64x) then click ‘Next’
Click ‘Next’
LiteTouch Boot Media added to Windows Deployment Service