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:
The ConvertTo-UcsCentralCmdlet enables you to learn about the PowerTool cmdlets that performs configuration action by generating the cmdlet in one of the following ways:
Note | Flash debuggers are different for different browsers. For example, Internet Explorer has a different flash debugger than Mozilla Firefox. |
TraceOutputFileEnable=1
If there is no mm.cfg file, you can create one and follow the link to editor configure mm.cfg file:
http://helpx.adobe.com/flash-player/kb/configure-debugger-version-flash-player.htmlStep 1 | After the UCS Central GUI launches, at the login page, press Ctrl + Alt + Shift+L. The Logger Console flash popup is displayed. Modify the logger preferences as follows: | ||
Step 2 | Enter the username and password for UCS Central and log on to UCS Central.
A log file is created in the log file location depending on the OS. For more information on the exact location of the log files, see https://helpx.adobe.com/flash-player/kb/configure-debugger-version-flash-player.html. The name of the log file is the name mentioned in the property TraceOutputFileName in mm.cfg. If this property does not exist, the name is flashlog.txt.
| ||
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 web UI is generated in the PowerTool console. |
Perform the following steps to disable the integrated flash player and to install the flash debugger:
The following example is used to generate cmdlet from a backup file.
Generate cmdlets from backup file:
ConvertTo-UcsCentralCmdlet -UcsCentralBackup -LiteralPath "C:\central-mgr.xml" -OutputPath "C:\central-mgr.txt"
Generate the cmdlets through 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.
Generate cmdlets for the specified managed object
Get-UcsCentralServiceProfile -Name testSP | ConvertTo-UcsCentralCmdlet
Get a list of orgs across Cisco UCS Central systems, in the Default UCS Central list.
Get-UcsCentralOrg | select UcsCentral, Name, Dn
Get a handle to the root level Org.
Get-UcsCentralOrg -Level root
Add five orgs to UCS.
1..5 | % { Add-UcsCentralOrg -Ucs <handle or name> qwerty$_ }
Retrieve faults, group them by severity.
Get-UcsCentralFault | group Severity
Retrieve critical faults.
Get-UcsCentralFault -Severity critical | select UcsCentral, Dn, Cause
Get Managed Object including all children.
Get-UcsCentralComputeRequirement -Name sp_name -Hierarchy
Get service profile at the root level without descending into org root children.
Get-UcsCentralComputeRequirement -Name sp_name –LimitScope
Get the policy usage details for Managed Object.
Get-UcsCentralOrg -Level root | Get-UcsCentralServiceProfile -Name "SPTemplate" -LimitScope | Get-UcsCentralPolicyUsage
Start a transaction.
Start-UcsCentralTransaction
Perform operation.
....
End a transaction.
Complete-UcsCentralTransaction
Undo a transaction.
Undo-UcsCentralTransaction
Create a UUID Suffix pool.
Add-UcsCentralUuidSuffixPool -Name uuid_pool -Prefix 2EEB8026-9084-11E1
Add a block of UUID Suffixes to the suffix pool.
Get-UcsCentralUuidSuffixPool -Name uuid_pool | Add-UcsCentralUuidSuffixBlock -From 0000-000000000001 -To 0000-00000000002C
Remove a UUID Suffix pool.
Get-UcsCentralUuidSuffixPool -Name uuid_pool | Remove-UcsCentralUuidSuffixPool
Create a MAC pool.
Add-UcsCentralMacPool -Name mac_pool
Add a block of mac to the mac pool.
Get-UcsCentralMacPool -Name mac_pool | Add-UcsCentralMacMemberBlock -From 00:25:B5:00:00:00 -To 00:25:B5:00:00:09
Remove a mac pool.
Get-UcsCentralMacPool -Name mac_pool | Remove-UcsCentralMacPool
Get all WWNN pool in UCS Central.
Get-UcsCentralWwnPool -Purpose node-wwn-assignment
Create a WWNN pool.
$wwnn_pool = Add-UcsCentralWwnPool -Name wwnn_pool -Purpose node-wwn-assignment
Add a WWN block to the WWNN pool.
$wwnn_pool | Add-UcsCentralWwnMemberBlock -From 20:00:00:24:B5:00:00:00 -To 20:00:00:24:B5:00:00:09
Remove a WWNN pool.
$wwnn_pool | Remove-UcsCentralWwnPool
Get all WWPN pool in UCS Central.
Get-UcsCentralWwnPool -Purpose port-wwn-assignment
Create a WWPN pool.
$wwpn_pool = Add-UcsCentralWwnPool -Name wwpn_pool -Purpose port-wwn-assignment
Remove a WWPN pool.
$wwpn_pool | Remove-UcsCentralWwnPool
Copies a service profile.
Get-UcsCentralServiceProfile -Name “demoSP” | Copy-UcsCentralServiceProfile -DestinationOrg (Get-UcsCentralOrg -Level root) -NewName “clonedSP”
Adds new service profiles using an existing service profile template.
Get-UcsCentralOrg -Level root | Get-UcsCentralServiceProfile -Type initial-template -name “SPTemplate” -LimitScope | Add-UcsCentralServiceProfileFromTemplate -NamePrefix @("ManualSP01","ManualSP02") -DestinationOrg "org-root" Get-UcsCentralOrg -Level root | Get-UcsCentralServiceProfile -Type initial-template -name “SPTemplate” -LimitScope | Add-UcsCentralServiceProfileFromTemplate -Prefix "Simple" -Count "1" -DestinationOrg "org-root"
Renames existing service profile.
Get-UcsCentralServiceProfile -name “spName” | Rename-UcsCentralServiceProfile -NewName "spNewName"
Associates a service profile to a server pool or blade or rack servers.
Get-UcsCentralServiceProfile -Name “demoSPName” | Connect-UcsCentralServiceProfile -Blade (Get-UcsCentralBlade -SlotId 1)
Renames existing service profile.
Get-UcsCentralServiceProfile -Name “demoSPName” | Disconnect-UcsCentralServiceProfile -Force
Remove any previously stored backups in UCS Central.
Get-UcsCentralMgmtDataExporter | Remove-UcsCentralMgmtDataExporter
The PathPattern can be autofilled, allowing the cmdlet to be used with multiple Cisco UCS Central domains. Create and download full-state system backup of UCS Central. Binary file that includes a snapshot of the entire system is created. 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.
Backup-UcsCentral -Type full-state -PathPattern 'C:\Backups\${UcsCentral}-${yyyy}${MM}${dd}-${HH}${mm}-full-state.tgz'
Create and download logical backup of UCS Central. An XML file that includes all logical configuration settings such as service profiles, VLANs, VSANs, pools, and policies are created. 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.
Backup-UcsCentral -Type config-logical -PathPattern 'C:\Backups\${UcsCentral}-${yyyy}${MM}${dd}-${HH}${mm}-config-logical.tgz'
Create and download system backup of UCS Central. An XML file that includes all system configuration settings such as usernames, roles, and locale is created. 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.
Backup-UcsCentral -Type config-system -PathPattern 'C:\Backups\${UcsCentral}-${yyyy}${MM}${dd}-${HH}${mm}-config-system.tgz'
Create and download config-all backup of UCS Central. An XML file that includes all system and logical configuration settings is created. 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.
Backup-UcsCentral -Type config-all -PathPattern 'C:\Backups\${UcsCentral}-${yyyy}${MM}${dd}-${HH}${mm}-config-all.tgz'
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-UcsCentralBackup -LiteralPath 'C:\Backups\config-all.tgz'
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.
Import-UcsCentralBackup -LiteralPath 'C:\Backups\config-all.tgz' -Merge
Technical support data for the entire UCS Central instance is created and downloaded to the specified file.
Get-UcsCentralTechSupport -PathPattern 'C:\${UcsCentral}-techsupp-ucsc.tar' –All -RemoveFromUcsCentral -TimeoutSec 600
Technical support data for the Operation Manager provider is created and downloaded to the specified file.
Get-UcsCentralTechSupport -PathPattern 'C:\${UcsCentral}-techsupp-opmgr.tar' -OperationMgr -RemoveFromUcsCentral -TimeoutSec 600
Get all Local Service Profiles with Name containing string 'SJC'.
Get-UcsCentralComputeRequirement -Filter 'Name -cmatch SJC' | select UcsCentral, Dn, Name
Get all Roles that have the fault privilege.
Get-UcsCentralRole -Filter 'Priv -ccontains fault' | select UcsCentral, Dn, Name
Get all Roles that have the fault or operations privilege.
Get-UcsCentralRole -Filter 'Priv -canybit fault,operations’ | select UcsCentral, Dn, Name
Get all Roles that have the fault and operations privilege.
Get-UcsCentralRole -Filter 'Priv -callbits fault,operations' | select UcsCentral, Dn, Name
Get a list of faults generated between 4/18/2012 9:00 and 4/19/2012 9:30.
Get-UcsCentralFault -Filter 'Created -cbw "4/18/2012 9:00","4/19/2012 9:30"' | select UcsCentral, Cause, Dn, Created
Get Local Service Profiles with Name equals 'SJC'.
Get-UcsCentralComputeRequirement -Filter 'Name -ceq SJC' | select UcsCentral, Dn, Name
Get all Local Service Profiles with Name equals 'SJC/sjc/SjC', and so on
Get-UcsCentralComputeRequirement -Filter 'Name -ieq sjc' | select UcsCentral, Dn, Name
Get all Local Service Profiles with Name beginning with string 'SJC/sjc/SjC', and so on
Get-UcsCentralComputeRequirement -Filter 'Name -ilike SJC*' | select UcsCentral, Dn, Name
Get all Local Service Profiles with Name except 'SJC/sjc/SjC', and so on
Get-UcsCentralComputeRequirement -Filter 'Name -ine SJC' | select UcsCentral, Dn, Name
Get Managed Object of a specific DN.
Get-UcsCentralManagedObject -Dn "compute/sys-1010/chassis-2
Get all Managed Objects of a particular class.
Get-UcsCentralManagedObject -ClassId faultInst
Get DNs of Managed Objects of a particular class.
Get-UcsCentralManagedObject -ClassId faultInst –DnList
Get names of all Service Profiles from org-root.
Get-UcsCentralOrg -Level root | Get-UcsCentralManagedObject -ClassId computeRequirement | select Name
Get immediate children of org-root.
Get-UcsCentralOrg –Level root | Get-UcsCentralChild
Get parent of a Managed Object.
Get-UcsCentralOrg –Name Finance | Get-UcsCentralParent
Create an Org
Add-UcsCentralManagedObject -ClassId orgOrg -PropertyMap @{Dn = "org-root/org-Finance"; Name = "Finance"}
Modify description of Managed Object.
Get-UcsCentralManagedObject -Dn org-root/org-Finance | Set-UcsCentralManagedObject -PropertyMap @{Descr = "Example generic set cmdlet";}
Remove a Managed Object.
Get-UcsCentralOrg –Name Finance | Remove-UcsCentralManagedObject
Export the configuration of a Managed Object.
Export-UcsCentralXml -Dn org-root/org-Finance -Hierarchy -LiteralPath C:\cmd.xml
Export the XML of a Managed Object into a file.
Get-UcsCentralServiceProfile -Name sp_name | Export-UcsCentralMoXml | Out-File c:\mo.xml
Import the configuration from the XML file.
Import-UcsCentralXml -LiteralPath C:\cmd.xml
Import XML of a Managed Object and convert it into objects.
Import-UcsCentralMoXml -LiteralPath c:\mo.xml
Start a KVM session for service profile.
Get-UcsCentralComputeRequirement -Name sp_name | Start-UcsCentralKvmSession
Start a KVM session for blade 2.
Get-UcsCentralChassis -Id 2 | Get-UcsCentralBlade -SlotId 2 | Start-UcsCentralKvmSession
Start a KVM session for RackUnit 1 with custom frame Title.
Get-UcsCentralRackUnit -Id 1 | Start-UcsCentralKvmSession -FrameTitle "KVM session window for RackUnit"
Get a list of Registered UCS Domains
Get-UcsCentralUcsDomain
Get Meta information about all Managed Object mapped cmdlets.
Get-UcsCentralCmdletMeta
Get Meta information about ComputeRequirement mapped cmdlets.
Get-UcsCentralCmdletMeta -ClassId computeRequirement
View the hierarchy of the ComputeRequirement class.
Get-UcsCentralCmdletMeta -Noun UcsCentralComputeRequirement -Tree
Get Meta information for the ComputeRequirement noun.
Get-UcsCentralCmdletMeta -Noun UcsCentralComputeRequirement Get-UcsCentralCmdletMeta -Noun ComputeRequirement
See the Managed Object information for ComputeRequirement.
Get-UcsCentralCmdletMeta -ClassId computeRequirement | Select -ExpandProperty MoMeta
See the Managed Object property information for ComputeRequirement.
Get-UcsCentralCmdletMeta -ClassId computeRequirement | Select -ExpandProperty MoMeta | Select -ExpandProperty PropertyMeta
The ModifyPresent option ensures that the add-cmdlets modify the MO, if it exists, instead of returning an error.
The Compare-UcsCentralManagedObject cmdlet compares the managed objects from same or different UcsCentral domains and provides the ManagedObject Difference object generated by the cmdlet.
Note | You can execute the cmdlet, without a connection handle. |
$refObj = Get-UcsCentralServiceProfile -Name TestSP -UcsCentral Ucsc-Bidwell-Dev-131a $diffObj= Get-UcsCentralServiceProfile -Name TestSP -UcsCentral UcsCentral-Dev-Auburn $compareObj = Compare-UcsCentralManagedObject -ReferenceObject $refObj -DifferenceObject $diffObj
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.
Sync-UcsCentralManagedObject -Difference $compareObj -UcsCentral UcsCentral-Dev-Auburn -Force
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.
Start-UcsCentralDomainSession [-Ip <string>] [-UcsCentral <UcsCentralHandle[]>] [<CommonParameters>]
The Get-UcsCentralServer cmdlet returns all the servers regardless of the form factor.
Get-UcsCentralServer [-UcsCentral <UcsCentralHandle[]>] [-Xml] [<CommonParameters>]
Cisco UCS Communities is a platform to discuss, share, and learn about the Cisco Products and Technologies. For blogs, discussion forums and documents related to UCS integrations with Cisco UCS Communities partner ecosystem, visit https://communities.cisco.com/ucsintegrations .
For more information, you can access related documents from the following links:
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.
For information on obtaining documentation, submitting a service request, and gathering additional information, see What’s New in Cisco Product Documentation at:http://www.cisco.com/c/en/us/td/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.