cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3923
Views
0
Helpful
4
Replies

UCS Powershell find VLANs of VLAN Group

LittleNickey
Level 1
Level 1

Hi,

 

I'm running UCS Manager 2.2 with powershell module CiscoUcsPS (v1.3.1.0) and want to find all VLANs of a specific VLAN Group.

 

If I run Get-UcsVlan I get all the VLANs, but this doesn't seem to contain any information regarding which VLAN Group they are member of.

If I run Get-UcsFabricNetGroup I get all the VLAN Groups, but this doesn't seem to contain any information regarding which VLANs that are members of the groups.

 

So I figured that maybe I could pipe the two commands, but that doesn't seem to work

Get-UcsFabricNetGroup -Ucs $UCS -Name Prod | Get-UcsVlan 

 

Get-UcsVlan : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:55
+ Get-UcsFabricNetGroup -Ucs $UCS -Name Prod | Get-UcsVlan
+                                                       ~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Cisco.Ucs.FabricNetGroup:PSObject) [Get-UcsVlan], ParameterBindingExce
   ption
    + FullyQualifiedErrorId : AmbiguousParameterSet,Cisco.Ucs.Cmdlets.GetUcsVlan

 

Anyone got any other ideas?

1 Accepted Solution

Accepted Solutions

Perfect !

Have a look at

http://www.thomasmaurer.ch/2013/10/cisco-ucs-powershell-convertto-ucscmdlet/

and use the PS command "Convertto-UCSCmdlet", then issue the sequence of UCSM GUI commands and voila, it will show you the equivalent PS cmdlets.

View solution in original post

4 Replies 4

Walter Dey
VIP Alumni
VIP Alumni

If you can achieve this with a sequence of UCS manager commands, there will be also a corresponding sequence of PS commands. If not, I think it won't be possible.

Did you try with UCSM ?

I'm afraid I'm rather new to UCS and have never run any CLI commands for UCSM, so I don't know if that is possible.

 

However, in the UCSM GUI there is a view where this is possible. "LAN" tab -> "LAN Cloud" -> "VLAN Groups" -> Select a group -> "VLANs" tab.

Perfect !

Have a look at

http://www.thomasmaurer.ch/2013/10/cisco-ucs-powershell-convertto-ucscmdlet/

and use the PS command "Convertto-UCSCmdlet", then issue the sequence of UCSM GUI commands and voila, it will show you the equivalent PS cmdlets.

Excellent! Kind of like VMware Onyx Project then.

 

Get-UcsFabricPooledVlan is the command I was looking for. This both have a parameter corresponding to VLAN Group, -FabricNetGroup, and is pipeable to Get-UcsFabricNetGroup!

 

Get-UcsFabricNetGroup -Ucs $UCS -Name Prod | Get-UcsFabricPooledVlan

Review Cisco Networking for a $25 gift card

Review Cisco Networking for a $25 gift card