Getting Started

This chapter contains the following sections:

Connecting to Cisco UCS Manager

Procedure


Step 1

Launch Cisco UCS Manager PowerTool from the desktop shortcut.

Step 2

View all cmdlets, functions, and aliases supported by the Cisco UCS Manager PowerTool.

Get-Command -Module Cisco.UcsManager

Get-Command -Module Cisco.UcsManager | group CommandType

Get-Command -Module Cisco.UcsManager | measure

Step 3

Connect to a Cisco UCS domain.

$handle = Connect-Ucs <ip or hostname> -NotDefault


What to do next

Default UCS

If no handle or name is specified, the Cisco UCS domain handle is added to a DefaultUcs domain list unless the –Ucs parameter is specified, the first cmdlet in the pipeline operates on the default Ucs list.

Connect-Ucs<ip or hostname>
Get the Default Ucs list

Get-UcsPSSession
Get UCS consolidated status information

Get - UcsChassis
Get the set of all chassis objects

Get-UcsChassis
Get the object pertaining to chassis 1

Get-UcsChassis -Id 1
Get the set of blades, pertaining to chassis 1

Get-UcsChassis -Id 1 | Get-UcsBlade
Enable HTTP on the FI

Get-UcsHttp | Set-UcsHttp -AdminState enabled
Disable HTTP on the FI

Get-UcsHttp | Set-UcsHttp -AdminState disabled
Disconnect

Disconnect - Ucs

Default UCS List with Multiple UCS

PowerTool cmdlets can work with multiple Cisco UCS domains by specifying multiple handles.

Connect to a Cisco UCS domain

$handle1 = Connect-Ucs <ip1> -NotDefault
$handle2 = Connect-Ucs <ip2> -NotDefault
Get-UcsStatus -Ucs $handle1,$handle2
Disconnect-Ucs -Ucs $handle1,$handle2

By default, multiple Cisco UCS handles are not allowed in DefaultUcs. However, you can override by using the Set-UcsPowerToolConfiguration cmdlet.

Get-UcsPowerToolConfiguration
Set-UcsPowerToolConfiguration -SupportMultipleDefaultUcs $true
Connect-Ucs <ip1>
Connect-Ucs <ip2>
Get-UcsStatus
Disconnect-Ucs
Connect to multiple Cisco UCS domains using the same login credentials

$user = "<username>"
$password = "<password>" |
 ConvertTo-SecureString -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($user, $password) $servers = @("<Imc1>", "<Imc2>", "<Imc3>")
Connect-Imc $servers -Credential $cred

Credentials To or From a File


Connect-Ucs <ip1>
Connect-Ucs <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-Ucs

Login can be initiated from credentials stored in a file


Connect-Ucs -LiteralPath C:\work\labs.xml

Specify proxy while logging in with credentials stored in a file


$proxy = New-Object System.Net.WebProxy
$proxy.Address = "http:\\<url>:<port>"
$proxy.UseDefaultCredentials = $false
$proxy.Credentials = New-Object System.Net.NetworkCredential("<user name>", "<password>")
Connect-Ucs -LiteralPath C:\work\lab.xml –Proxy $proxy

Login to an additional system and add the credentials to the file


Connect-Ucs <ip3>
Export-UcsPSSession -Path C:\work\lab?.xml -Merge

IPv6 Support

  • Allows connectivity to Cisco UCS Manager using IPv6 addresses

  • Provides access to external client applications such as, scp, ftp, tftp, ntp, dns, and external client services such as, sshd, httpd, snmpd over IPv6 addresses.

    Connect-Ucs [2001::0202:*3F*:*E1*:8**9]

SSL Handling

When a user connects to a Cisco UCS server and the server cannot recognize any valid certificates; connection establishment depends on InvalidCertificateAction.InvalidCertificateAction is set to Ignore by default. By default PowerTool is configured to establish the connection without taking into account if the certificate is invalid.

You can override this using theSet-UcsPowerToolConfiguration cmdlet.


Get-UcsPowerToolConfiguration
Set-UcsPowerToolConfiguration -InvalidCertificateAction Fail

Name

Description

Fail

The cmdlet does not establish connection if the certificate is not valid.

Ignore

The cmdlet establishes a connection without taking into account that the certificate is invalid.

Default

(Windows default) The cmdlet establishes a connection if the certificate is valid.

Register or Unregister Cisco UCS Central

If you want to have Cisco UCS Central manage a Cisco UCS domain, you need to register that domain. When you register, you need to choose the types of policies and other configurations, such as backups and firmware, that will be managed by Cisco UCS Central and which will be managed by Cisco UCS Manager.

Before you register a Cisco UCS domain with Cisco UCS Central, do the following:

Procedure


Step 1

Configure an NTP server and the correct time zone in both Cisco UCS Manager and Cisco UCS Central to ensure that they are in sync. If the time and date in the Cisco UCS domain and Cisco UCS Central are out of sync, the registration may fail.

Step 2

Obtain the hostname or IP address of Cisco UCS Central.

Step 3

Obtain the shared secret that you configured when you deployed Cisco UCS Central.


$password = "SharedSecret" | ConvertTo-SecureString -AsPlainText -Force
Register-UcsCentral -Name 10.10.10.10 -SharedSecret $password
Step 4

Unregister from UCS Central


Get-UcsCentral | Unregister-UcsCentral

Aliases

Some aliases have been defined for convenience.


gal | ? {$_.Name -like "*-Ucs*" } | select Name

The following table lists the aliases and the corresponding cmdlets:

Alias

Cmdlet

Acknowledge-UcsBlade

Set-UcsBlade -Lc rediscover

Acknowledge-UcsChassis

Set-UcsChassis -AdminState re-acknowledge

Acknowledge-UcsFault

Confirm-UcsFault

Acknowledge-UcsFex

Set-UcsFex -AdminState re-acknowledge

Acknowledge-UcsRackUnit

Set-UcsRackUnit -Lc rediscover

Acknowledge-UcsServerUnit

Set-UcsServerUnit -Lc rediscover

Acknowledge-UcsSlot

Set-UcsFabricComputeSlotEp -AdminState reacknowledge

Add-UcsMo

Add-UcsManagedObject

Associate-UcsServiceProfile

Connect-UcsServiceProfile

Compare-UcsMo

Compare-UcsManagedObject

Decommission-UcsBlade

Set-UcsBlade -Lc decommission

Decommission-UcsChassis

Set-UcsChassis -AdminState decommission

Decommission-UcsFex

Set-UcsFex -AdminState decommission

Decommission-UcsRackUnit

Set-UcsRackUnit -Lc decommission

Decommission-UcsServerUnit

Set-UcsServerUnit -Lc decommission

Disable-UcsDiskLocatorLed

Set-UcsStorageLocalDisk -AdminActionTrigger triggered -AdminAction led-off

Disassociate-UcsServiceProfile

Disconnect-UcsServiceProfile

Enable-UcsDiskLocatorLed

Set-UcsStorageLocalDisk -AdminActionTrigger triggered -AdminAction led-on

Get-UcsCentral

Get-UcsPolicyControlEp

Get-UcsMo

Get-UcsManagedObject

Recommission-UcsBlade

Set-UcsFabricComputePhEp -AdminState enabled

Recommission-UcsChassis

Set-UcsFabricSwChPhEp -AdminState enabled

Recommission-UcsFex

Set-UcsFabricSwChPhEp -AdminState enabled

Recommission-UcsRackUnit

Set-UcsFabricComputePhEp -AdminState enabled

Recommission-UcsServerUnit

Set-UcsFabricComputeMSlotEp -SlotAdminState reacknowledge

Remove-UcsBlade

Set-UcsBlade -Lc remove

Remove-UcsCartridge

Set-UcsCartridge -Lc remove

Remove-UcsChassis

Set-UcsChassis -AdminState remove

Remove-UcsFex

Set-UcsFex -AdminState remove

Remove-UcsMo

Remove-UcsManagedObject

Remove-UcsRackUnit

Set-UcsRackUnit -Lc remove

Reset-UcsIoModule

Set-UcsIom -AdminPowerState cycle-immediate -AdminState acknowledged -AdminPeerPowerState policy

Reset-UcsPeerIoModule

Set-UcsIom -AdminPowerState policy -AdminState acknowledged -AdminPeerPowerState cycle-immediate

Set-UcsMo

Set-UcsManagedObject

Sync-UcsMo

Sync-UcsManagedObject

Unregister-UcsCentral

Remove-UcsPolicyControlEp