09-08-2017 11:23 AM
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
Solved! Go to Solution.
09-25-2017 07:01 AM
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
09-25-2017 07:01 AM
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
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: