Gets virtual machine host objects from the Virtual Machine Manager database.
Description
Gets one or more virtual machine host objects from the System Center Virtual Machine Manager (VMM) database. Virtual machine hosts are physical computers that are managed by VMM on which you can deploy virtual machines.
Virltual Machine Manager supports the following types of hosts:
- Hyper-V hosts
- VMware ESX hosts
- Citrix XenServer hosts
For more information about virtual machine hosts in Virtual Machine Manager, type: "Get-Help Add-VMHost -detailed".
For more information about Get-SCVMHost, type: "Get-Help Get-SCVMHost -online".
Parameters
ComputerName
Required?
false
Accept Pipeline Input?
false
Position?
0
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are: FQDN, IPv4 or IPv6 address, or NetBIOS name.
NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.
ID
Required?
false
Accept Pipeline Input?
false
Position?
named
Specifies the numerical identifier (as a globally unique identifier, or GUID) for a specific object.
VMMServer
Required?
false
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies a VMM server object.
ComputerName
Required?
false
Accept Pipeline Input?
false
Position?
0
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are: FQDN, IPv4 or IPv6 address, or NetBIOS name.
NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.
VMHostCluster
Required?
true
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies a VMM host cluster object.
ComputerName
Required?
false
Accept Pipeline Input?
false
Position?
0
Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are: FQDN, IPv4 or IPv6 address, or NetBIOS name.
NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.
VMHostGroup
Required?
true
Accept Pipeline Input?
true (ByValue)
Position?
named
Specifies a virtual machine host group object.
Examples
1: Get all hosts managed by the
specified VMM server.
The first command gets the host group object named HostGroup01 from VMMServer01 and stores the object in the $HostGroup variable.
The second command gets all host objects in the host group stored in $HostGroup and stores the objects in the $HostsInHG variable.
The last command uses the pipeline operator to pass all host objects stored in $HostsInHG to the Format-Table cmdlet, which displays the name of each host and the virtual machines deployed on that host in a table.
4: Get all hosts in a specific host
cluster and display information about them to the user.
The first command gets the host cluster object named Cluster01 from VMMServer01 and stores the object in the $Cluster variable.
The second command gets all host objects in Cluster01 and stores the objects in the $HostsInCluster variable.
The last command passes all host objects stored in $HostsInCluster to the Format-Table cmdlet, which displays the name and virtualization platform of each host in Cluster01.
5: Get a specific host located on a
perimeter network by its IP address.
The first command gets the host object located on a perimeter network whose IP address is 10.199.53.5 from VMMServer01 and stores the object in the $VMHost variable.
The second command uses the pipeline operator to pass the host object in $VMHost to the Select-Object cmdlet, which displays the computer name and operating system for the host.