Cisco UCS Central PowerTool is a PowerShell module which helps automate all aspects of Cisco UCS Central management. PowerTool enables easy integration with existing IT management processes and tools.
Cisco UCS Central delivers a common management solution across all Cisco UCS Domains. Cisco UCS Central provides a centralized resource inventory and a repository of policies. Cisco UCS Central simplifies configuration, maintains policy uniformity, resolves contention on global identities, and effectively and consistently manages Cisco UCS domains.
Cisco UCS Central provides a global view of the entire data center through multiple Cisco UCS Manager sessions. Cisco UCS Central can manage Cisco UCS operations for an individual data center or for multiple data centers. Cisco UCS Central facilitates operational management for firmware management, catalog management, configuration backup and restores operations, monitor log, core files, and faults.
Cisco UCS Central is designed for aggregated management functions beyond what Cisco UCS Manager supports today.
Bulk of the PowerTool cmdlets work on the UCS Central Management Information Tree (MIT), performing create, modify or delete actions on the Managed Objects (MO) in the tree.
One of the easiest ways to learn UCS Central configuration through PowerTool is to generate PowerTool cmdlets, for configuration actions performed with the GUI, using the ConvertTo-UcsCentralCmdlet.
Management Information Model
All the physical and logical components that comprise a Cisco UCS Central are represented in a hierarchical Management Information Model (MIM), referred to as the Management Information Tree (MIT). Each node in the tree represents a Managed Object (MO), uniquely identified by its Distinguished Name (DN). Figure 1 illustrates the MIM.
Figure 1 Management Information Model
The following illustration shows a sample (partial) MIT for three chassis.
Managed Objects (MO) are abstractions of Cisco UCS domain resources, such as fabric interconnects, chassis, blades, and rack-mounted servers. Managed Objects represent any physical or logical entity that is configured / managed in the Cisco UCS Central MIT. For example, physical entities such as Servers, Chassis, I/O cards, Processors and logical entities such as resource pools, user roles, service profiles, and policies are represented as managed objects.
Figure 2 Managed Objects
Every managed object is uniquely identified in the tree with its Distinguished Name (Dn) and can be uniquely identified within the context of its parent with its Relative Name (Rn). The Dn identifies the place of the MO in the MIT. A Dn is a concatenation of all the relative names starting from the root to the MO itself. Essentially, Dn = [Rn]/[Rn]/[Rn]/…/[Rn].
In the example below, Dn provides a fully qualified name for adaptor-1 in the model.
A Relative Name (Rn) may have the value of one or more of the MO’s properties embedded in it. This allows in differentiating multiple MOs of the same type within the context of the parent. Any properties that form part of the Rn as described earlier are referred to as Naming properties.
For instance, multiple blade MOs reside under a chassis MO. The blade MO contains the blade identifier as part of its Rn (blade-[Id]), thereby uniquely identifying each blade MO in the context of a chassis.
References to Managed Objects
The contents of the managed objects are referred to during the operation of Cisco UCS Central. Some of the MOs are referred to implicitly or as part of deployment of another MO (The Service Profile MO may refer to a template or a VNIC refers to a number of VLAN MOs).
The different types of references can be classified as shown below:
Figure 3 References to Managed Objects
A singleton MO type is found at most once in the entire MIT and is typically referred to implicitly.
Non-Singleton MO type may be instantiated one or more times in the MIT. In many cases, when an MO refers to another, the reference is made by name. Depending on the type of the referenced MO, the resolution may be hierarchical. For instance, a service profile template is defined under an org. Since an org may contain sub-orgs, a sub org may have a service profile template defined with the same name. Now, when a service profile instance refers to a service profile template (by name), the name is looked up hierarchically from the org of the service profile instance up until the root org. The first match is used. If no match is found, the name “default” is looked up in the similar way and the first such match is used.
Non-Singleton / Named / Non-Hierarchical
Non-Singleton / Named / Hierarchical
Non-Singleton / Contained
BootDefinition under LsServer (ServiceProfile)
VnicEtherIf under VnicEther
Properties of Managed Objects
Properties of Managed Objects may be classified as Configuration or Operational.
Configuration properties may be classified as:
Naming properties: Form part of the Rn. Needs to be specified only during MO creation and cannot be modified later.
Create-Only properties: May be specified only during MO creation and cannot be modified later. If the property is not specified, a default value is assumed.
Read / Write properties: May be specified during MO creation and can also be modified subsequently.
Operational properties indicate the current status of the MO / system and are hence read-only.
Figure 4 Properties of Managed Objects
The table below lists the examples of the various property types.
Name in LsServer (Service Profile MO)
Type in LsServer
Read / Write
Description in LsServer
OperState in LsServer
Methods are Cisco UCS Central XML APIs used to manage and monitor the system. There are methods supported for:
The class query methods (ConfigResolveClass(es), ConfigResolveChildren) allow a filter to be specified so that a specific set of MOs are matched and returned by the method.
The supported filters are:
Match if all specified values present in a multi-valued property
Match if any of the specified values present in a multi-valued property
Match if the property’s value lies between the two values specified
Match if property’s value is the same as the specified value
Match if property’s value is greater than or equal to the specified value
Match if property’s value is greater than the specified value
Match if property’s value is lesser than or equal to the specified value
Match if property’s value is lesser than the specified value
Match if property’s value is not equal to the specified value
Match if property’s value matches the pattern specified
Composite Filters (Acts on sub-filters)
Negates result of sub-filter
True, if all the sub-filters return true
True, if any of the sub-filters return true
All but about 25 of the PowerTool cmdlets are generated from the MO specification. Get, Add, Set, Remove cmdlets or a subset is generated for the various MO types. All cmdlets support the Xml parameter, which dumps the Xml request and response on the screen.
Add Cmdlet - Uses the ConfigConfMo(s) method with MO status “created” along with the specified property values. If the ModifyPresent parameter is specified, status “created,modified” is specified instead.
Get Cmdlet - Uses the ConfigResolveClass method to retrieve MOs. If any property parameters are specified, they are used to generate “eq” filters. If multiple property parameters are specified, the multiple “eq” filters are combined with an “and” filter.
Set Cmdlet - Uses the ConfigConfMo(s) method with MO status “modified” along with the specified property values. If the Force parameter is specified, there will be no prompt for confirmation.
Remove Cmdlet - Uses the ConfigConfMo(s) method with MO status “deleted”. If the Force parameter is specified, there will be no prompt for confirmation.
The following table lists the properties that can be specified for a given Verb:
Operational / Read-Only
The following table lists the methods invoked to generate the required XML requests:
1.This is not a cmdlet. It is a background service.
Get-UcsCentralCmdletMeta cmdlet is used to explore the MO types, the corresponding nouns, supported verbs, properties of the MOs, the details of properties including the type (Naming, Read/Write and so on), and the version of UCS Central the property was introduced.
Before installing Cisco UCS Central PowerTool, ensure that the system meets the following requirements:
Windows PowerShell 2.0 or above must be installed on the system
.NET Framework Version 2.0 SP1 (or later)
Cisco UCS Central
Cisco UCS Central PowerTool is compatible with the followoing Cisco UCS Central releases:
Windows PowerShell Requirements
Cisco UCS Central PowerTool supports Windows PowerShell 2.0 and later
Before You Begin
Ensure you have PowerShell v2.0 installed in your system
Close any instances of PowerShell running with the PowerTool module loaded
Step 1 Download and launch the installer.
Step 2 (Optional) Select Create Shortcut to add a shortcut on the desktop.
Step 1 Launch Cisco UCS Central PowerTool from the desktop shortcut.
Step 2 View all cmdlets, functions, and aliases supported by the Cisco UCS Central PowerTool.
Get-Command -Module CiscoUcsCentralPS
Get-Command -Module CiscoUcsCentralPS | group CommandType
Get-Command -Module CiscoUcsCentralPS | measure
Step 3 Connect to a Ucs Central system.
$handle = Connect-UcsCentral <ip or hostname> -NotDefault
Note If login is successful Connect-UcsCentral, by default, adds the UCS Central handle to the Default UCS Central list, unless the -NotDefault option is specified. Every cmdlet that operates on Ucs Central takes the –UcsCentral parameter, where the handle can be specified.
Step 4 Use the following cmdlets:
a. Get org objects.
Get-UcsCentralOrg -UcsCentral $handle
Disconnect-UcsCentral –UcsCentral $handle
Default UCS Central
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 the set of all chassis objects.
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
Default UCS Central List with Multiple UCS Central Systems
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-Ucs -UcsCentral $handle1,$handle2
By default, multiple Cisco UCS Central handles are not allowed in Default UCS Central. This can be overridden using the Set-UcsCentralPowerToolConfiguration cmdlet.
When a user connects to a Cisco UCS Central server and the server cannot recognize any valid certificates, 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-UcsCentralPowerToolConfiguration cmdlet.
Note Flash debuggers are different for different browsers. For example, Internet Explorer has a different flash debugger than Mozilla Firefox.
Configure mm.cfg file located under user directory. For instance, if there is a user name demoUser on the windows system, this file should be located in this path - “C:\Users\demoUser”. This file provides instructions to the Flash Debugger about settings related to log dumping. Modify the following properties as:
If there is no mm.cfg file user can create one and follow below mentioned link to edit/configure mm.cfg file:
Note If there is no Logs folder, create a Logs folder and repeat steps 1through step 2.
Step 3 Launch UCS Central PowerTool and run the ConvertTo-UcsCentralCmdlet.
This cmdlet monitors the configuration logs in the log file.
Step 4 Perform operations in the GUI.
The cmdlets for actions performed in the GUI are generated in the powertool console.
If you are using Google Chrome, perform the following steps to disable the integrated flash player and to install the flash debugger:
Step 1 Install Flash debugger that is compatible with the Netscape browser.
Step 2 Select chrome://plugins and click the "[+] Details" icon, located at the top right corner of the screen.
Step 3 Search for the Shockwave Flash or Flash option.
Step 4 Disable the integrated version installed under the Chrome directory on your local machine. For example, C:\Program Files (x86)\Google\Chrome\Application\39.0.2171.71\PepperFlash\pepflashplayer.dll
Step 5 Enable the Netscape compatible Flash Debugger which you installed in the Systems directory on your local machine. For example, C:\Windows\SysWOW64\Macromed\Flash\NPSWF32_15_0_0_239.dll.
Step 6 Restart the Google Chrome browser.
Generate Cmdlets From Backup file
The following example is used to generate cmdlet from a backup file.
Generating Cmdlets From UCS Central PowerShell Object
Cmdlets can be generated by piping the UCS Central objects from a Get cmdlet to the ConvertTo cmdlet. In the following example, ConvertTo cmdlet generates the cmdlets required to re-create the 'testSP' service profile object.
The PathPattern can be auto-filled, allowing the cmdlet to be used with multiple Cisco UCS Central domains. Create and download full-state system backup of UCS Central. This creates a binary file that includes a snapshot of the entire system. You can use the file generated from this backup to restore the system during disaster recovery. This file can restore or rebuild the configuration on the new UCS Central VM. You cannot use this file for an import.
Create and download logical backup of UCS Central. This creates an XML file that includes all logical configuration settings such as service profiles, VLANs, VSANs, pools, and policies. You can use the file generated from this backup to import these configuration settings to the UCS Central. You cannot use this file for a system restore.
Create and download system backup of UCS Central. This creates an XML file that includes all system configuration settings such as usernames, roles, and locales. You can use the file generated from this backup to import these configuration settings to the UCS Central. You cannot use this file for a system restore.
Create and download config-all backup of UCS Central. This creates an XML file that includes all system and logical configuration settings. You can use the file generated from this backup to import these configuration settings to the UCS Central. You cannot use this file for a system restore. This file does not include passwords for locally authenticated users.
The import function is available for all configuration, system configuration, and logical configuration files. You can perform an import while the system is up and running.
Import all configuration xml (An XML file that includes all system and logical configuration settings. The current configuration information is replaced with the information in the imported configuration file one object at a time.
Import all configuration xml. The information in the imported configuration file is #compared with the existing configuration information. If there are conflicts, the import operation overwrites the information on the Cisco UCS Central domain with the information in the import configuration file.
There are two cmdlets related to CCO Image handling:
Get a List of Images from CCO.
$images = Get-UcsCentralCcoImageList
Select 1.2(1a) images and download the images. Get-UcsCentralCcoImage first checks if the image is available locally. If the image exists and md5sum matches, no download is initiated. If not, the image is downloaded.
The Sync-UcsCentralManagedObject cmdlet uses the ManagedObject Difference object to synchronize the managed objects on a same or different UcsCentral and make the configuration same throughout UcsCentral.
The Start-UcsCentralDomainSession cmdlet launches the UCS Manager GUI sessions registered with UcsCentral. You can provide a specific IP address of the UCS Manager to launch a particular UCS Manager GUI session..
To provide technical feedback on this document, or to report an error or omission, please send your comments to firstname.lastname@example.org. We appreciate your feedback.
Obtaining Documentation and Submitting a Service Request
For information on obtaining documentation, submitting a service request, and gathering additional information, see the monthly What’s New in Cisco Product Documentation, which also lists all new and revised Cisco technical documentation:
Subscribe to the What’s New in Cisco Product Documentation as an RSS feed and set content to be delivered directly to your desktop using a reader application. The RSS feeds are a free service. Cisco currently supports RSS Version 2.0.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.