04-14-2015 06:34 AM - edited 03-01-2019 12:08 PM
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?
Solved! Go to Solution.
04-15-2015 05:17 AM
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.
04-14-2015 01:48 PM
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 ?
04-15-2015 01:03 AM
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.
04-15-2015 05:17 AM
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.
04-15-2015 07:25 AM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide