![]() TotalSteps ) Write-Host "Task sequence complete. #Powershell process monitor install#PS C:\ > $InProgress Name : VM1 PercentComplete : 30 Settings : Warnings : 0 Errors : 0 DeploymentStatus : 1 StartTime : 17:05:23 EndTime : ID : 32 UniqueID : c7b224e0-a918-4182-a370-96d5c9cb7410 CurrentStep : 40 TotalSteps : 131 StepName : Install Operating System LastTime : 17:05:39 DartIP : DartPort : DartTicket : VMHost : VMName : ComputerIdentities : Until ( $InProgress. For this example, I’m using a local path because I’m running the PowerShell script on the server hosting the MDT deployment share. ![]() In this instance, I’ve set the computer name of the target machine that I want to monitor and the path to the MDT deployment share. Example 3: Wait for processes for a specified time In this example, Wait-Process waits 30 seconds for the Outlook and Winword processes to stop. I’m first going to set a couple of variables. PowerShell Copy p Get-Process notepad Wait-Process -Id p.id Wait-Process -Name 'notepad' Wait-Process -InputObject p These commands have the same results and can be used interchangeably. For this article, I’ve used MDT 2012 Update 1. To use PowerShell with MDT requires installing the MDT console which will provide the PowerShell snapin support.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |