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

Get-AdaptorUnit & Service Profiles

nsous9001
Level 1
Level 1

1. How do you cross-reference the Get-AdaptorUnit DN (sys/chassis-1/blade-1/adaptor-1) with the service profile name? I'm running Get-UcsAdaptorUnit | Select dn, Model, @{N="Firmware";e={($_ | Get-UcsMgmtController | Get-UcsFirmwareRunning -Deployment system).Version}} but it only has an object for DN

2. Which cmdlets accept input parameters? Ideally I'd like to pipe Get-UCSServiceProfile into Get-UCSAdaptorUnit

1 Accepted Solution

Accepted Solutions

jomcdono
Cisco Employee
Cisco Employee

Hi Nick,

By using the Parent Dn of the AdaptorUnit, you can get the Service Profile by specifying the -PnDn.  Create the PnDn of the Service Profile by removing the Rn portion of the AdaptorUnit

For example if the AdaptorUnit Dn is sys/chassis-1/blade-1/adaptor-1, remove the "adaptor-1" Rn and use the resulting string as the value of GetServiceProfiles's -PnDn parameter.  PnDn stands for Physical Node Distinguished Name. If there is a Service Profile Associated to the compute resource then the Service Profile Name will display

Get-UcsAdaptorUnit | Select dn, Model, @{N="Firmware";e={($_ | Get-UcsMgmtController | Get-UcsFirmwareRunning -Deployment system).Version}}, @{N="Service Profile                                 ";e={ $_ | %{Get-UcsServiceProfile -PnDn $($_.dn.SubString(0,$_.dn.LastIndexOf("/"))) | Select-Object -ExpandProperty Name}}}


Hope that helps.


Regards,

John

View solution in original post

1 Reply 1

jomcdono
Cisco Employee
Cisco Employee

Hi Nick,

By using the Parent Dn of the AdaptorUnit, you can get the Service Profile by specifying the -PnDn.  Create the PnDn of the Service Profile by removing the Rn portion of the AdaptorUnit

For example if the AdaptorUnit Dn is sys/chassis-1/blade-1/adaptor-1, remove the "adaptor-1" Rn and use the resulting string as the value of GetServiceProfiles's -PnDn parameter.  PnDn stands for Physical Node Distinguished Name. If there is a Service Profile Associated to the compute resource then the Service Profile Name will display

Get-UcsAdaptorUnit | Select dn, Model, @{N="Firmware";e={($_ | Get-UcsMgmtController | Get-UcsFirmwareRunning -Deployment system).Version}}, @{N="Service Profile                                 ";e={ $_ | %{Get-UcsServiceProfile -PnDn $($_.dn.SubString(0,$_.dn.LastIndexOf("/"))) | Select-Object -ExpandProperty Name}}}


Hope that helps.


Regards,

John

Cisco UCS X-Series Energy Efficiency Offer