cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
628
Views
5
Helpful
1
Replies

How to add VLAN Group to VNIC Template with PowerShell?

rmxyz
Level 1
Level 1

Hi,

I'm struggling to figure out the right PowerShell cmdlets to use, in order to add a VLAN group onto a VNIC template.

To add individual VLANs, this works:

 

$VNICTemplate = Get-UcsVnicTemplate -Name 'ESXi-iSCSI-A'
$VNICTemplate | Add-UcsVnicInterface -ModifyPresent -DefaultNet 'yes' -Name 'iscsi-a' -ModifyPresent -ErrorAction Stop

 

Creating a VLAN group requires the use of `Add-UcsFabricNetGroup`, 

The documentation against vnic templates doesn't say how. I've searched via google and it seems others have struggled too. Does anyone know?

Thanks!

1 Accepted Solution

Accepted Solutions

rmxyz
Level 1
Level 1

Solved using a tip from another post in here, by looking at the XML submitted via POST request made when performing the action in the browser.

$VNICTemplate | Add-UcsFabricNetGroupRef -Name 'core'

View solution in original post

1 Reply 1

rmxyz
Level 1
Level 1

Solved using a tip from another post in here, by looking at the XML submitted via POST request made when performing the action in the browser.

$VNICTemplate | Add-UcsFabricNetGroupRef -Name 'core'

Review Cisco Networking for a $25 gift card

Review Cisco Networking for a $25 gift card