cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
548
Views
0
Helpful
1
Replies

get-ucsvnic and service profile

Dragomir
Level 1
Level 1

how do I get the mac address of a vnic on each sp in one line?

I cn only do this

Get-UcsServiceProfile -UCS va-ucs -AssignState assigned | Get-UcsVnic vmnic0_mgmt_A | ft name, addr

but i also need the sp name along with this

1 Reply 1

nveda
Level 1
Level 1

Hi Tony,

Try following, it will help.

PS C:\> Get-UcsServiceProfile -AssignState assigned | %{ $vnic  = Get-UcsVnic -ServiceProfile $_; Write-Host "vnicname:" $vnic.Name   "vnicaddr:" $vnic.Addr   "spname:" $_.Name }

vnicname: 1-host-eth-1 vnicaddr: derived spname: SP_00

vnicname: eth0            vnicaddr: derived spname: sp_ironic

Thank you,

Nitin

Review Cisco Networking for a $25 gift card

Review Cisco Networking for a $25 gift card