Quantcast
Channel: OS|DC
Viewing all articles
Browse latest Browse all 64

Automatically update MDT boot images in WDS revisited

$
0
0

5685308510_73385ba4f9_o

Back in the days Michael Niehaus wrote a great post on how to update boot images on your WDS server from MDT. The solution as one annoying requirement: Deployment Share and WDS should be hosted on the same server. This scenario is out of scope for many of my customers so i made an updated version that support both WDS on board and on remote server.

 

Pre-requisites

This new implementation rely on WinRm to pilot remote WDS. The script try to start WinRM if not configured so you should not have to worry about it.  By the way, if you have firewall rules or GPO preventing WinRM to work, then it’s maybe time for great decisions...

The deployment share name must not include spaces (Not my fault bros!!). If this is your case, here is how to correct the name:

Open your deployment share and note carefully the shared path in the property panel:

2014-07-26_23h16_14

Close your deployment share with a right click on it, then close MDT:

2014-07-26_23h21_34

Rename your deployment share, then modify the advanced sharing property and give it the same name you picked up earlier on the shared path property:

 2014-07-26_23h26_37

Finally you should be able to reopen your deployment share in MDT.

2014-07-26_23h35_36

The script has been tested on Windows 7/8.1 with MDT 2010/2013 and server 2012 R2. Other server version won’t work because WDS cmdlet only exists since 2012 R2 if I’m correct. The script has also been tested successfully on workgroup and on domain.

 

Install

Copy the script WDSUpdate.ps1 in your deployment share’s scripts folder

Edit the file C:\Program Files\Microsoft Deployment Toolkit\Templates\LiteTouchPE.xml and add the following line in the <Exits> section :  <Exit>Powershell.exe "%deployroot%\Scripts\WDSupdate.ps1"</Exit>

2014-07-24_04h11_09

On customsettings.ini (Right click on deployment share, then property, then rules), you will set up your WDS server information with those new rules:

WDS-Update: Set the UNC path of your WDS shared folder
                      ex: WDS-Update=\\10.130.26.101\reminst

WDS-User: Set an account that have enough right to manage WDS
                  ex: WDS-User=MasterTeam-Server\administrateur

WDS-Password: Set the account password. The password is obfuscated in base 64.
                          You can use this Powershell command to convert the password
[System.Convert]::ToBase64String([System.Text.Encoding]::UNICODE.GetBytes(“MyPassword”))
                         ex: WDS-Password=TQB5AFAAYQBzAHMAdwBvAHIAZAA=

WDS-Image: set the name of the image that should be created or updated on the WDS server
                     ex: WDS-Image=Osd-Couture

2014-07-25_20h48_47

Everything is now configured, Then after, every time you’ll launch the “Update deployment share” button, both x86 and X64 Win Pe Images will be updated on the WDS server.

2014-08-20_17h09_06

You can of course check that everything has run smoothly with the log file located in C:\Windows\logs\WDS-BootImageUpdate.log

Useful information like what images are currently loaded in the remote WDS are logged in the file:

2014-07-25_23h11_48

Also to make things as clear as possible, every images loaded on the WDS server get the processor architecture they work on added to their name, and the date they were last modified is also included in the comment:  

2014-07-25_23h55_08

Feel free to report issue, Happy holidays

Diagg


Viewing all articles
Browse latest Browse all 64

Trending Articles