Get-VM: Difference between revisions
m
applied a bit of formatting, added categories
(New page: NAME Get-VM SYNOPSIS Gets from a VMware Infrastructure server one or more virtual machines. SYNTAX Get-VM [-Datastore <Datastore[]>] [-Location <VIContainer[]>] [[-Na...) |
m (applied a bit of formatting, added categories) |
||
Line 1: | Line 1: | ||
NAME | =====NAME===== | ||
Get-VM | Get-VM | ||
Line 11: | Line 11: | ||
DETAILED DESCRIPTION | =====DETAILED DESCRIPTION===== | ||
Gets from a VMware Infrastructure server one or more objects that represent virtual machines. Returns a set of virtual machines that correspond to the filter criteria provided by the cmdlet parameters. For virtual machines with multiple NICs and therefore multiple IP addresses, the "IPAddress" property of the VMGuest object contains all IP addresses of the virtual machine. | |||
The IP at position 0 is the primary IP address. | |||
PARAMETERS | PARAMETERS | ||
-Datastore <Datastore[]> | -Datastore <Datastore[]> | ||
Gets the virtual machines associated with one or more of the specified | Gets the virtual machines associated with one or more of the specified datastores. | ||
Passing values to this parameter through a pipeline is deprecated | |||
and will be removed in one of the following releases. | |||
Required? false | Required? false | ||
Line 33: | Line 30: | ||
-Location <VIContainer[]> | -Location <VIContainer[]> | ||
Specifies one or more virtual infrastructure container objects (e.g. | Specifies one or more virtual infrastructure container objects (e.g. folders, | ||
datacenters, clusters) to search for virtual machines. | |||
Required? false | Required? false | ||
Line 53: | Line 50: | ||
-Id <String[]> | -Id <String[]> | ||
Specifies one or more virtual machine hosts by ID. Use commas to | Specifies one or more virtual machine hosts by ID. Use commas to separate | ||
multiple IDs. | |||
Required? false | Required? false | ||
Line 63: | Line 60: | ||
-NoRecursion | -NoRecursion | ||
Get-VM searches recursively from any provided starting point. Setting | Get-VM searches recursively from any provided starting point. Setting this | ||
parameter disables the command recursive behavior. | |||
Required? false | Required? false | ||
Line 89: | Line 86: | ||
"get-help about_commonparameters". | "get-help about_commonparameters". | ||
INPUT TYPE | =====INPUT TYPE===== | ||
RETURN TYPE | =====RETURN TYPE===== | ||
VirtualMachine[] | VirtualMachine[] | ||
NOTES | =====NOTES===== | ||
Line 107: | Line 104: | ||
Retrieves information about all of the virtual machines registered with the currently selected VMware Infrastructure server. | |||
Line 119: | Line 115: | ||
This command retrieves information about all virtual machines registered with the currently-selected VMware Infrastructure server whose names begin with "webTier." | |||
RELATED LINKS | =====RELATED LINKS===== | ||
[[Remove-VM]] | [[Remove-VM]] | ||
[[New-VM]] | [[New-VM]] | ||
Line 136: | Line 128: | ||
[[Stop-VM]] | [[Stop-VM]] | ||
[[Suspend-VM]] | [[Suspend-VM]] | ||
[[Category: Powershell]][[Category: VI-Toolkit]] |