cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1529
Views
0
Helpful
4
Replies
Highlighted
Beginner

UCS Powershell find VLANs of VLAN Group

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
Advocate

Perfect !Have a look athttp:/

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.

4 REPLIES 4
Advocate

If you can achieve this with

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 ?

Beginner

I'm afraid I'm rather new to

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.

Advocate

Perfect !Have a look athttp:/

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.

Beginner

Excellent! Kind of like

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

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards