Get-NetworkAdapter

Synopsis

Retrieves the virtual network adapters available on a vSphere server.

Syntax

Get-NetworkAdapter [[-VM] <VirtualMachine[]>] [[-Template] <Template[]>] [[-Snapshot] <Snapshot[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

New-NetworkAdapter
Remove-NetworkAdapter
Set-NetworkAdapter

Detailed Description

Retrieves the virtual network adapters available on a vSphere server. The cmdlet returns a set of virtual network adapters assigned to the virtual machines, templates, and snapshots specified by the VirtualMachine, Template, and Snapshot parameters. At least one of these parameters must be provided. To specify a server different from the default one, use the -Server parameter.

Parameters

NameDescriptionRequired?Pipeline InputDefault Value
VMSpecify the virtual machines from which you want to retrieve virtual network adapters.falsetrue (ByValue)
TemplateSpecify the templates from which you want to retrieve virtual network adapters.falsetrue (ByValue)
SnapshotSpecify the snapshots from which you want to retrieve virtual network adapters.falsetrue (ByValue)
ServerSpecify 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.falsefalse

Input Type

Return Type

VMware.VimAutomation.Types.NetworkAdapter

Notes

Examples

--------------  Example 1 --------------

C:\PS>Get-NetworkAdapter -VM "XP_VC_Tech"


Retrieves the network adapter assigned the XP_VC_Tech virtual machine.


MacAddress       : 00:30:56:94:0a:1a
WakeOnLanEnabled : True
NetworkName      : VM Network
ConnectionState  : VMware.VimAutomation.Client20.ConnectInfoImpl
Id               : VirtualMachine-vm-16/4000
Name             : Network Adapter 1

Copyright © 1998 - 2009 VMware, Inc. All rights reserved.