Syntax
Wait-Tools [-VM] <VirtualMachine[]> [[-TimeoutSeconds] <Int32>] [-HostCredential <PSCredential>] [-HostUser <String>] [-HostPassword <SecureString>] [-Server <VIServer[]>] [<CommonParameters>]Related Commands
Online versionDetailed Description
Waits for the VMware Tools of the specified virtual machines to load. The cmdlet returns the virtual machines or guests on which VMware Tools have loaded successfully within the specified time limits. You can cancel the operation before completion using Ctrl+C.Parameters
| Name | Type | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|---|
| TimeoutSeconds | Int32 | Specify the time period in seconds to wait for VMware Tools to start before cancelling the operation. | false | false | |
| Guest | VMGuest[] | Specify the guest operating systems for which you want to wait VMware Tools to load. | true | true (ByValue) | |
| VM | VirtualMachine[] | Specify the virtual machines for which you want to wait VMware Tools to load. | true | true (ByValue) | |
| HostCredential | PSCredential | Specify credentials for authenticating with the ESX host of the specified virtual machine. This parameter is needed only if you have authenticated with the vCenter Server via SSPI. If no SSPI is used, the credentials for authentication with vCenter Server are used. | false | false | |
| HostPassword | SecureString | Specify a password for authenticating with the ESX host of the specified virtual machine. This parameter is needed only if you have authenticated with the vCenter Server via SSPI. If no SSPI is used, the password for authentication with vCenter Server is used. | false | false | |
| HostUser | String | Specify a username for authenticating with the ESX host of the specified virtual machine. This parameter is needed only if you have authenticated with the vCenter Server via SSPI. If no SSPI is used, the username for authentication with vCenter Server is used. | false | false | |
| Server | VIServer[] | Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false |
Return Type
VirtualMachine or VMGuestNotes
Examples
-------------- Example 1 --------------
$vm = Start-VM VM* | Wait-Tools
Starts the virtual machines with names starting with VM and Waits for their VMware Tools to load.
-------------- Example 2 --------------
Wait-Tools -VM $vm -TimeoutSeconds 180
Waits for the VMware Tools of the virtual machines in the $vm variable to start. If VMware Tools do not load after 180 seconds, the operation is aborted.
-------------- Example 3 --------------
Wait-Tools -VM VM* -TimeoutSeconds 120 -HostCredential $hostCredential
Waits for the VMware Tools of the virtual machines in the $vm variable to start. If VMware Tools do not load after 120 seconds, the operation is aborted. Host credentials are required when you run the cmdlet on environments older than vSphere 4.0.
-------------- Example 4 --------------
Restart-VMGuest WindowsXP | Wait-Tools
Restart the guest operating system WindowsXP and waits for the VMware Tools to load.