The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter contains the following sections:
If no handle or name is specified, the UCS Central handle is added to a Default UCS Central list. Unless the-UcsCentral parameter is specified, the first cmdlet in the pipeline operates on the default UCS Central list.
Connect-UcsCentral <ip or hostname>
Get the Default UCS Central list.
Get-UcsPSSession
Get the set of all chassis objects.
Get-UcsCentralChassis
Get the object pertaining to chassis 1.
Get-UcsCentralChassis -Id 1
Get the set of blades, pertaining to chassis 1.
Get-UcsCentralChassis -Id 1 | Get-UcsCentralBlade
Disconnect.
Disconnect-UcsCentral
PowerTool cmdlets can work with multiple UCS Central systems by specifying multiple handles.
Connect to a Cisco UCS Central system.
$handle1 = Connect-UcsCentral <ip1> -NotDefault
$handle2 = Connect-UcsCentral <ip2> -NotDefault
Disconnect-UcsCentral-UcsCentral $handle1,$handle2
By default, multiple Cisco UCS Central handles are not allowed in Default UCS Central. You can be override using the Set-UcsPowerToolConfiguration cmdlet.
Get-UcsPowerToolConfiguration
Set-UcsPowerToolConfiguration -SupportMultipleDefaultUcs $true
Connect-UcsCentral <ip1>
Connect-UcsCentral <ip2>
Get-UcsPSSession
Disconnect-UcsCentral
Connect to multiple Cisco UCS Central systems using the same login credentials.
$user = "<username>"
$password = "<password>" | ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($user, $password)
$servers = @("<ucsc1>", "<ucsc2>", "<ucsc3>")
Connect-UcsCentral $servers -Credential $cred
Connect-UcsCentral <ip1>
Connect-UcsCentral <ip2>
Credentials can be stored to a file. The stored credentials are encrypted with a specified Key.
Export-UcsPSSession -LiteralPath C:\work\labs.xml
Disconnect-UcsCentral
Login can be initiated from credentials stored in a file.
Connect-UcsCentral -LiteralPath C:\work\labs.xml
Log in to an extra system and add the credentials to the file.
Connect-UcsCentral <ip3>
Export-UcsPSSession -Path C:\work\lab?.xml -Merge
When connected to Cisco UCS Central server, the server does not recognize any valid certificates. The, the connection depends on InvalidCertificateAction. InvalidCertificateAction is set to Ignore by default. By default PowerTool is configured to establish the connection without considering the validity of the certificate.
You can override this using the Set-UcsPowerToolConfiguration cmdlet.
Get-UcsPowerToolConfiguration
Set-UcsPowerToolConfiguration -InvalidCertificateAction Fail
Status | Description |
Fail | The cmdlet does not establish a connection if the certificate is not valid. |
Ignore | The cmdlet establishes the connection without considering the validity of the certificate. |
Default | (Windows default) The cmdlet establishes a connection if the certificate is valid. |
Aliases are the simplified cmdlets which can be used to perform Cisco UCS Central operations.
gal | ? {$_.Name -like "*-UcsCentral*" } | select Name
Aliases | Cmdlets |
Acknowledge-UcsCentralBlade | Set-UcsCentralComputePhysicalOperation -Lc rediscover |
Acknowledge-UcsCentralChassis | Set-UcsCentralEquipmentChassisOperation -AdminState re-acknowledge |
Acknowledge-UcsCentralFault | Confirm-UcsCentralFault |
Acknowledge-UcsCentralFex | Set-UcsCentralEquipmentFexOperation -AdminState re-acknowledge |
Acknowledge-UcsCentralRackUnit | Set-UcsCentralComputePhysicalOperation -Lc rediscover |
Acknowledge-UcsCentralServerUnit | Set-UcsCentralComputePhysicalOperation -Lc rediscover |
Acknowledge-UcsCentralSlot | Set-UcsCentralFabricComputeSlotEpOperation -AdminState reacknowledge |
Add-UcsCentralMo | Add-UcsCentralManagedObject |
Associate-UcsCentralServiceProfile | Connect-UcsCentralServiceProfile |
Compare-UcsCentralMo | Compare-UcsCentralManagedObject |
Decommission-UcsCentralBlade | Set-UcsCentralComputePhysicalOperation -Lc decommission |
Decommission-UcsCentralChassis | Set-UcsCentralEquipmentChassisOperation -AdminState decommission |
Decommission-UcsCentralFex | Set-UcsCentralEquipmentFexOperation -AdminState decommission |
Decommission-UcsCentralRackUnit | Set-UcsCentralComputePhysicalOperation -Lc decommission |
Decommission-UcsCentralServerUnit | Set-UcsCentralComputePhysicalOperation -Lc decommission |
Disassociate-UcsCentralServiceProfile | Disconnect-UcsCentralServiceProfile |
Get-UcsCentralMo | Get-UcsCentralManagedObject |
Get-UcsCentralUcsDomain | Get-UcsCentralExtpolClient |
Recommission-UcsCentralBlade | Set-UcsCentralFabricComputePhEpOperation -AdminState enabled |
Recommission-UcsCentralChassis | Set-UcsCentralFabricSwChPhEpOperation -AdminState enabled |
Recommission-UcsCentralFex | Set-UcsCentralFabricSwChPhEpOperation -AdminState enabled |
Recommission-UcsCentralRackUnit | Set-UcsCentralFabricComputePhEpOperation -AdminState enabled |
Recommission-UcsCentralServerUnit | Set-UcsCentralFabricComputePhEpOperation -AdminState enabled |
Remove-UcsCentralBlade | Set-UcsCentralComputePhysicalOperation -Lc remove |
Remove-UcsCentralCartridge | Set-UcsCentralComputeCartridgeOperation -Lc remove |
Remove-UcsCentralFex | Set-UcsCentralEquipmentFexOperation -AdminState remove |
Remove-UcsCentralMo | Remove-UcsCentralManagedObject |
Remove-UcsCentralRackUnit | Set-UcsCentralComputePhysicalOperation -Lc remove |
Set-UcsCentralMo | Set-UcsCentralManagedObject |
Sync-UcsCentralMo | Sync-UcsCentralManagedObject |