PDF(330.4 KB) View with Adobe Reader on a variety of devices
ePub(108.3 KB) View in various apps on iPhone, iPad, Android, Sony Reader, or Windows Phone
Updated:March 18, 2014
Bias-Free Language
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.
Cisco IMC PowerTool is a PowerShell module which helps automate aspects of Cisco UCS C-Series Stand alone Rack Mount servers and Cisco UCS E-Series servers using XML APIs. Cisco IMC PowerTool enables easy integration with existing IT management processes and tools.
The Cisco IMC PowerTool cmdlets work on the Cisco IMC Management Information Tree (MIT). The cmdlets allow you to create, modify, or delete actions on the Managed Objects (MOs) in the tree.
Management Information Model
All the physical and logical components that comprise a Cisco C-Series and E-Series servers are represented in a hierarchical Management Information Model (MIM), which is referred to as the Management Information Tree (MIT). Each node in the tree represents a Managed Object (MO), which is uniquely identified by its distinguished name (DN). See Figure 1.
Figure 1 Management Information Model
Managed Objects
Managed Objects (MOs) (see Figure 2) are abstractions of Cisco IMC MIT resources, such as CPUs, DIMMs, adapter cards, fans, and power supply units. Managed Objects represent any physical or logical entity that is configured or managed in the Cisco IMC MIT For example, physical entities such as CPUs, DIMMs, adapter cards and fans and logical entities such as users, communication services like HTTP, SSH are represented as MOs.
Figure 2 Managed Objects
Each MO 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 that start from the root to the MO itself. Essentially, DN = [RN]/[RN]/[RN]/…/[RN].
In the following example, DN provides a fully qualified name for adapter-1 in the model.
< dn = “sys/rack-unit-1/adaptor-1” />
The above written DN is composed of the following RN:
A relative name (RN) might have a value of one or more of the MO properties embedded in it. This allows you to differentiate 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, adaptor MOs reside under a rack unit MO. The adaptor MO contains the adaptor identifier as part of its Rn(adaptor-[Id]), which uniquely identifies each adaptor MO in the context of a rack unit.
System Requirements
Before installing Cisco IMC 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 higher
Cisco IMC
Cisco IMC PowerTool is compatible with the following Cisco IMC releases:
Release 1.5 and above for the C-Series servers
Release 2.2(1) and above for the E-Series servers
Windows PowerShell Requirements
Cisco IMC PowerTool requires Windows PowerShell v2.0 or higher version to be installed on the system
Check the Microsoft web site for specific Windows PowerShell requirements
Installation Requirements
Before installing Cisco IMC PowerTool, you must do the following:
Close any instances of PowerShell running with the PowerTool module loaded.
Uninstall the beta versions of the Cisco IMC PowerTool
Methods
Methods are Cisco UCS XML APIs used to manage and monitor the system. The following methods are supported:
Authentication
aaaLogin—Initial method for logging in.
aaaRefresh—Refreshes the current authentication cookie.
aaaLogout—Exits the current session and deactivates the corresponding authentication cookie.
configResolveDn—Retrieves objects by DN.
configResolveClass—Retrieves objects of a given class.
configResolveChildren—Retrieves the child objects of an object.
configResolveParent—Retrieves the parent object of an object.
configConfMo—Affects a single managed object (for example, a DN).
eventSubscribe—To register for events
Cisco IMC PowerTool Mapping
All but about 10 of the Cisco IMC PowerTool cmdlets are generated from the MO specification. A noun is used in place of the type (Fan instead of EquipmentFan and so on). 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 method with the MO status “created” with the specified property values. If the Force parameter is specified, there is no prompt for confirmation.
Get Cmdlet —Uses the ConfigResolveClass method to retrieve MOs. XML API of Cisco UCS C-Series Rack Mount servers do not support any filters. So if any property parameters are specified, PowerTool gets all the instances of the specified class and filters them on the client side using the property values.
Set Cmdlet —Uses the ConfigConfMo method with MO status “modified” with the specified property values. If the Force parameter is specified, there is no prompt for confirmation.
Remove Cmdlet —Uses the ConfigConfMo method with the MO status “deleted”. If the Force parameter is specified, there is no prompt for confirmation.
This table lists the properties that can be specified for a given verb:
Property
Get
Add
Set
Naming
Yes (Positional)
Yes (Positional)
No
Create-Only
Yes
Yes
No
Read-Write
Yes
Yes
Yes
Operational/ Read-Only
Yes
No
No
This table lists the types that can come down the pipeline for corresponding cmdlets:
Verb/Type
Pipeline Input
Get
Singleton—none non-singleton—Parent Type
Add
Singleton—none non-singleton—Parent Type
Set
MO has naming property—Same type MO has no naming property—Same or Parent Type
Remove/Clear
Same Type
This table lists the methods invoked to generate the required XML requests:
ConfigResolveClass (The output is then filtered for the matching Dns)
Get-ImcManagedObject –Dn
ConfigResolveDn
Connect-Imc
AaaLogin
Disconnect-Imc
AaaLogout
Background 1
AaaRefresh
Get-ImcChild
ConfigResolveChildren
1.This is not a cmdlet. It is a background service.
Get-ImcCmdletMeta is a useful cmdlet 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 Cisco IMC that the property was introduced in.
Installation
Supports Cisco IMC Version 1.5 or later for C-Series and Cisco IMC version 2.1(1) or later for E-Series.
Before You Begin
Ensure that you have PowerShell v2.0 or above installed in your system.
Close any instances of PowerShell running with the Cisco IMC PowerTool module loaded.
Installation
Step 1 Download and launch the installer.
Step 2 (Optional) Choose Create Shortcut to add a shortcut on the desktop.
Getting Started
Step 1 From the desktop shortcut, launch IMC PowerTool.
Step 2 View all cmdlets, functions, and aliases supported by Cisco IMC PowerTool.
Get-Command -Module CiscoImcPs
Get-Command -Module CiscoImcPs | group CommandType
Get-Command -Module CiscoImcPs | measure
Step 3 Connect to a Cisco UCS C-Series and E-Series Server.
$handle = Connect-Imc <ip or hostname> -NotDefault
Note After logging on, by default, the Cisco UCS handle is added to the default Cisco UCS C-Series and E-Series Server list, unless the -NotDefault option is specified. Every cmdlet that operates on a Cisco UCS C-Series and E-Series Server takes the –Imc parameter, where the handle can be specified.
Step 4 Connect to a Cisco UCS C-Series and E-Series Server using a proxy.
$handle = Connect-Imc <ip or hostname> -Proxy $proxy
Step 5 Use the following cmdlets:
a. Get the consolidated status information from the Cisco C-Series and E-Series Server.
Get-ImcStatus -Imc $handle
b. Get the inventory summary of the C-Series Unit.
Get-ImcRackUnit -Imc $handle
c. Disconnect.
Disconnect-Imc –Imc $handle
Default Cisco UCS
If no handle or name is specified, the Cisco UCS C-Series and E-Series Server handle is added to a DefaultImc server list unless the –Imc parameter is specified. The first cmdlet in the pipeline operates on the default UCS list.
Connect to UCS C-Series rack server
Connect-Imc <ip or hostname>
Get the default rack server.
Get-ImcPSSession
Get the status information and CIMC version of the rack server.
Get-ImcStatus
Get information about the physical unit of the rack server.
Get-ImcRackUnit
Enable HTTP on the rack server.
Get-ImcHttp | Set-ImcHttp -AdminState enabled
Disable HTTP on the rack server.
Get-ImcHttp | Set-ImcHttp -AdminState disabled
Disconnect the rack server.
Disconnect-Imc
Default UCS List with Multiple UCS
Cisco IMC PowerTool cmdlets can work with multiple Cisco UCS C-Series Rack Servers if you specify multiple handles.
Connect to a Cisco UCS C-Series and E-Series Server.
$handle1 = Connect-Imc <ip1> -NotDefault
$handle2 = Connect-Imc <ip2> -NotDefault
Get-ImcStatus -Imc $handle1,$handle2
Disconnect-Imc -Imc $handle1,$handle2
By default, multiple Cisco UCS C-Series handles are not allowed in DefaultImc. You can override this restriction by using the Set-UcsPowerToolConfiguration cmdlet.
Log in to an additional system and add the credentials to the file.
Connect-Imc <ip3>
Export-ImcPSSession -Path C:\work\lab.xml -Merge
SSL Handling
When a user connects to a Cisco UCS C-Series and E-Series Server and the server cannot recognize any valid certificates, the connection establishment depends on InvalidCertificateAction. InvalidCertificateAction is set to Ignore by default. By default Cisco IMC PowerTool is configured to establish the connection without taking into account if the certificate is invalid.
You can override this setting by using the Set-ImcPowerToolConfiguration cmdlet.
Cisco IMC GUI does not support XML logging. To generate Cmdlets ConvertTo-IMC Cmdlet rely on the output of the Get cmdlet and generate Cmdlets to replicate the same object hierarchy.
To provide technical feedback on this document, or to report an error or omission, please send your comments to ucs-docfeedback@external.cisco.com. We appreciate your feedback.
Obtaining Documentation and Submitting a Service Request
For information on obtaining documentation, using the Cisco Bug Search Tool (BST), submitting a service request, and gathering additional information, see What’s New in Cisco Product Documentation at: http://www.cisco.com/en/US/docs/general/whatsnew/whatsnew.html.
Subscribe to What’s New in Cisco Product Documentation, which lists all new and revised Cisco technical documentation, as an RSS feed and deliver content directly to your desktop using a reader application. The RSS feeds are a free service.
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.