Get-SCVMHostNetworkAdapter

Gets physical network adapter objects on a VMM host.

Description

The Get-SCVMHostNeworkAdapter cmdlet gets one or more physical network adapter objects on a host managed by System Center Virtual Machine Manager (VMM).

For more information about Get-SCVMHostNetworkAdapter, type: "Get-Help Get-SCVMHostNetworkAdapter -online".

Parameters

Name

Required? false
Accept Pipeline Input? false
Position? 0
Specifies the name of a VMM object.

VMHost

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts. 

For more information about each type of host, type: "Get-Help Add-SCVMHost -detailed". See the examples for a specific cmdlet to determine how that cmdlet uses this parameter.

Name

Required? false
Accept Pipeline Input? false
Position? 0
Specifies the name of a VMM object.

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Get all physical network adapters on the specified host.
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com" 
PS C:\> $HostAdapter = Get-SCVMHostNetworkAdapter -VMHost $VMHost
PS C:\> $HostAdapter | select -property Name, ConnectionState
The first command gets the host object named VMHost01 and stores the object in the $VMHost variable.

The second command gets all physical network adapter objects from VMHost01 and then stores the objects in the  $HostAdapter variable.

The third command displays the name and connection state for each adapter.
2: Get all physical network adapters in the VMM database.
PS C:\> Get-SCVMHostNetworkAdapter | Format-List Name, MacAddress, VMHost, MaxBandwidth
This command gets all physical network adapter objects on all hosts managed by the VMM server and displays each adapter's name, its MAC address, its host name, and its maximum bandwidth.
3: Get a physical network adapter by name from a specific host.
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com" 
PS C:\> $HostAdapter = Get-SCVMHostNetworkAdapter -VMHost $VMHost -Name "HostAdapter01"
PS C:\> $HostAdapter | Format-List -property Name,VLANEnabled,VLANMode
The first command gets the host object named VMHost01 and stores the object in the $VMHost variable.

The second command gets the network adapter object named HostAdapter01 from VMHost01 and stores the object in the $HostAdapter variable.

The third command passes the adapter object stored in $HostAdapter to the Format-List cmdlet, which displays the name, whether or not the virtual LAN is enabled, and the current value for the VLAN mode (either Trunk or Access).
4: Get each host network adapter that includes "Broadcom" in its name.
PS C:\> Get-SCVMHostNetworkAdapter -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -match "Broadcom" } | Format-List -property Name,IPAddresses
Gets host network adapter objects from VMMServer01 that include the string "Broadcom" in their name. and then displays the name and IP addresses for each adapter.

See Also