Intermediate UCS PowerTool Part I Cisco DevNet Learning Labs
UCS PowerTool is a library of PowerShell Cmdlets that enable the management of UCS environments from Microsoft Operating Systems, via the UCS XML API.
Cisco UCS is an Integrated Compute Infrastructure that has supported an XML API since its introduction. UCS Manager is the service that provides the XML API endpoint along with a graphical interface and a command line. The UCS components both physical and logical are represented as XML objects in a hierarchical Object Model format and can be manipulated via the XML API.
All UCS objects are described in an XML schema, this schema defines the objects their attributes and associated values. The schema is also used to generate more than 98% of the UCS PowerTool Library. Because a UCS component must be part of the Object Model to be part of the UCS system all components of UCS are always available via the XML API.
This Intermediate UCS PowerTool Learning Lab will guide you through the use of UCS PowerTool to connect to a UCS Manager, add/set several UCS Manager settings, export UCS Manager configurations (backup), and import a backup export.
Completion time: 30 minutes
Prior to starting this learning lab it would be helpful to understand UCS Manager and the functionality that it provides to manage UCS compute environments.
An understanding of PowerShell would also be helpful.
UCS PowerTool is a library of Microsoft PowerShell Cmdlets (pronounced command-lets) that enable the retrieval and manipulation of UCS Manager managed objects. UCS Manager API interaction can be categorized into several distinct sections.
- Queries and Filters
- Configurations and Transactions
- Event Subscription
UCS PowerTool provides services and cmdlets for all the categorizations of UCS Manager API interactions, along with cmdlets that allow for the inspection of object metadata, object hierarchical containment and object cmdlet action capabilities with pipeline object definitions.
UCS PowerTool cmdlets follow the same structure as PowerShell cmdlets (verb-noun) utilizing the defined Microsoft PowerShell Verbs. UCS PowerTool cmdlet nouns are the UCS objects. For example, to retrieve compute blade objects from UCS Manager, utilize the Get-UcsBlade cmdlet. The Get-UcsBlade cmdlet will retrieve all the UCS compute blade objects from all currently connected UCS Managers.
UCS PowerTool Download and Documentation
UCS PowerTool for UCS Manager is a component in the UCS PowerTool Suite. In addition to UCS Manager management capabilities in UCS PowerTool, there is also a cmdlet library for UCS Central and UCS IMC. UCS Central PowerTool library provides cmdlets to manage UCS Central, UCS Central is a manager of UCS Managers. UCS IMC PowerTool is a collection of cmdlets to manage the CIMC (Cisco Integrated Management Controller) component of the UCS C and E Series servers.
Event Infrastructure Utilization
If you are utilizing event provided infrastructure a script has been provided to reset the environment to pre-lab settings.
On the desktop Double-click the
Reset-Ucs-LL shortcut, provide the UCS Manager IP address that was assigned to you for the Learning Lab and hit Enter
Repeat this process for each assigned IP address, if you were assigned more than one.
Launch UCS PowerTool, view and set the Timezone.
Launch UCS PowerTool by double-clicking the UCS PowerTool icon on the Desktop.
UCS PowerTool Icon:
A UCS PowerTool for UCS Manager Console will open, at the prompt type
Connect-Ucs -Name <ip-address-ucs-manager>
Use the credentials below in the login dialog
- User: admin
- Password: password
Connect-Ucs credentials dialog:
View the results of a successful login.
There are several items shown in the console, these items are all attributes of the "login object" or "UCS PowerTool PS Session". Please refer to UCS PowerTool Introduction Part I, if you need a refresh on these attributes.
View some UCS Manager settings.
Multiple Get-UcsXXX output:
Some of the commands above will produce output and others will not, the reason is that some objects within the UCS Manager object model are implicit. That is they are always there and cannot be deleted. E.g. the Timezone object is present by default, however the NTP Server objects are created only when NTP Servers are added to the UCS Manager configuration.
Set the UCS Manager Timezone to 'America/Lima'
Set-UcsTimezone -Timezone America/Lima
Set-UcsTimezone failed output:
The command failed because the
objectto set is unknown to UCS PowerTool. UCS Manager objects can be set via PowerTool once the object is known, this is done by first performing a Get for a particular object and then pipelining the object to the Set command or by storing the returned object from the Get in a variable and supplying the variable to the Set command.
Set the UCS Manager Timezone to 'America/Lima'
Get-UcsTimezone | Set-UcsTimezone -Timezone America/Lima -Force
This time the output shows that the Timezone was Set to America/Lima.
Timezone format is a string in tzdata form.
This is the end of Exercise 1.