Get-SCVMHostNetworkAdapter
Applies To: System Center 2012 - Virtual Machine Manager
Get-SCVMHostNetworkAdapter
Gets physical network adapter objects on a VMM host.
Syntax
Parameter Set: NoFilter
Get-SCVMHostNetworkAdapter [[-Name] <String> ] [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: FilterByVMHost
Get-SCVMHostNetworkAdapter [[-Name] <String> ] -VMHost <Host> [ <CommonParameters>]
Detailed 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<String>
Specifies the name of a VMM object.
Aliases |
none |
Required? |
false |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-VMHost<Host>
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.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- HostNetworkAdapter
Examples
1: Get all physical network adapters on the specified host.
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.
PS C:\> $VMHost = Get-SCVMHost -ComputerName "VMHost01.Contoso.com"
PS C:\> $HostAdapter = Get-SCVMHostNetworkAdapter -VMHost $VMHost
PS C:\> $HostAdapter | select -property Name, ConnectionState
2: Get all physical network adapters in the VMM database.
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.
PS C:\> Get-SCVMHostNetworkAdapter | Format-List Name, MacAddress, VMHost, MaxBandwidth
3: Get a physical network adapter by name from a specific host.
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).
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
4: Get each host network adapter that includes "Broadcom" in its name.
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.
PS C:\> Get-SCVMHostNetworkAdapter -VMMServer "VMMServer01.Contoso.com" | where { $_.Name -match "Broadcom" } | Format-List -property Name,IPAddresses