VMware Cloud Community
Leffingwell
Contributor
Contributor
Jump to solution

Help interpreting output of Get-NetworkAdapter!

Greetings!

I have a simple task ahead of me, to roll a script over a block of freshly migrated VMs and change the VLAN they sit on.

I figured this would be as easy as grabbing the network adapter and changing the NetworkName field.  However, during some initial test output of Get-NetworkAdapter, I can't understand the output.

The VM itself, in vSphere shows as follows:

  • A single NIC (e1000), sitting on Vlan63.

When I grab the VM and it's adapter via  $vm | Get-NetworkAdapter, I get the following output:

Name                 Type       NetworkName  MacAddress         WakeOnLan

                                                                  Enabled

----                 ----       -----------  ----------         ---------

Network adapter 1    e1000      VM Networ... 00:50:56:a9:03:93       True

Network adapter 1    Flexible   VM Networ... 00:50:56:a9:04:26       True

Which was weird, then I filtered that a bit down to this:

Name                                        NetworkName                               

----                                        -----------                               

Network adapter 1                           VM Network Vlan62                         

Network adapter 1                           VM Network Vlan20  

No idea how to interpret this, or why it even displays this way.. it shows through various other filters that the Vlan20 adapter is disconnected.. but again when I'm looking at the config of the VM in vSphere there's just one NIC and it's on Vlan63.

Thanks in advance for any assistance!!

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I would guess you have more than object in $vm, can you check ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

I would guess you have more than object in $vm, can you check ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
LittleNickey
Enthusiast
Enthusiast
Jump to solution

Like Luc said, is there more than one VM in $vm? Did you use wildcards while defining $vm?

-- Oskar
0 Kudos
Leffingwell
Contributor
Contributor
Jump to solution

Wow... It sucks to admit it but it looks like I typed *tst02* yesterday, instead of *test02* when grabbing my test box.. that explains it all ! Thanks for the sanity check guys -__-.

0 Kudos