I'm running UCS Manager 2.2 with powershell module CiscoUcsPS (v126.96.36.199) 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
+ FullyQualifiedErrorId : AmbiguousParameterSet,Cisco.Ucs.Cmdlets.GetUcsVlan
Anyone got any other ideas?
Solved! Go to Solution.
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.
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