Everybody who has been playing around with MDT faces this issue. For some changes you make you need to update your deployment point.
I got tired of clicking through the GUI to update my deployment point, so that’s why I started hacking around in Powershell to automate this process
Here’s the powershell script for updating the deployment point, it takes 2 parameters:
name of deployment point and the updatetype (Full or FilesOnly)
#'***********************************************************************
#'* File: UpdateDeploymentPoint.ps1
#'* Creation Date: 2008/12/07
#'* Author: Henk Hofs (Login Consultants)
#'* Purpose: Updates MDT Deployment Point
#'* Usage: ./UpdateDeploymentPoint.ps1 [Deployment Point Name] [UpdateType]
#'* Reference:
#'*
#'* Revisions: 0.1 HHO Initial Version
#'***********************************************************************
# Initialization
# Get command-line parameters for Deployment Point name and UpdateType
Param
(
[string]$DeployName =$(throw "You must specify the name of the deployment point"),
[string]$UpdateType = $(throw "You must specify the update type, choose between: Full and FilesOnly")
)
#Set Upd Variable (boolean) according to input from parameter
Switch ($UpdateType)
{
"Full" {[Boolean]$Upd = 0}
"FilesOnly" {[Boolean]$Upd = 1}
}
#Create temp directory for log file if it does not exist
if ((Test-Path -Path C:\temp) -eq $false)
{
New-Item -ItemType directory c:\temp
}
#Load MDT Assembly
$MdtInstallDir = (gp "HKLM:\software\microsoft\deployment 4").Install_Dir
[Reflection.Assembly]::LoadFile( "$MdtInstallDir" + "Bin\Microsoft.BDD.ConfigManager.dll")
$manager = [Microsoft.BDD.ConfigManager.Manager]
#Load DeployManager class
$deployManager = $manager::DeployManager
#Load list of deployment points
$deployList = $deployManager.GetDataTable()
# Loop through the list
foreach ($item in $deployList)
{
#Look for the name that was entered as a paramater
if ($item["Name"] -eq $DeployName)
{
#Set $deployGUID variable and use it to update the deployment point
$deployGUID = $item["guid"]
Write-Host "Updating deployment point" $DeployName "with guid" $item["guid"] "using updatetype" $UpdateType
Write-Host "Please be patient..."
$deployPoint = $DeployManager[$deployGUID]
$deployPoint.Generate("x86", "C:\temp\DeployUpdate.log", $Upd)
}
}
Well, after you updated your deployment point, you have to replace your image in WDS. So I got something for that as well… a nice oneliner in CMD
wdsutil /replace-image /image:"Lite Touch Windows PE (x86)" /ImageType:Boot /Architecture:x86 /ReplacementImage /ImageFile:"D:\Distribution\Boot\LiteTouchPE_x86.wim"
You might want to replace “D:\Distribution\Boot\LiteTouchPE_x86.wim” with the path to you imagefile
-Henk
Comments
Leave a comment Trackback