Prevent schedules with heartbeat during MDT-Deploy
Hello,
i use the following PowerShell script with MDT to trigger a PDQ deployment.
netsh advfirewall set allprofiles state off
ipconfig /registerdns
psexec.exe \\SERVER -h -accepteula ipconfig /flushdns
psexec.exe \\SERVER -h -accepteula "C:\Program Files (x86)\PDQ Deploy\pdqdeploy.exe" Deploy -Package "MDT-Deploy" -Targets $env:COMPUTERNAME
start-sleep -s 30
while(test-path "C:\Windows\AdminArsenal\PDQDeployRunner\service-1.lock"){
start-sleep -s 30
}
This works fine, but when i have further schedules which use heartbeat, they start before or after my MDT-Deploy. When it starts after the actual MDT-Deploy, the schedule doesn't finish because the client reboots.
I changed the script in this way:
while(test-path -Path "C:\Windows\AdminArsenal\PDQDeployRunner\*" -Include *.lock){
Are there better ways to prevents schedules with heartbeat during MDT?
THX
Please sign in to leave a comment.
Comments
3 comments