Monday, October 24, 2016

UCS CONVERTTO-UCSCMDLET PROCEDURE:

  1. Load  Manager PowerTool. 
  2. Connect to a UCSM cluster IP (or emulator) by typing “Connect-Ucs <UCSM-IP address> or <hostname>” command. Enter the UCSM login details when prompted.
  3. After successful login, execute the cmdlet “Start-UcsGuiSession -LogAllXml” in Powertool to kick off the UCSM GUI.
  4. Once GUI has launched, type “ConvertTo-UcsCmdlet” in the PowerTool window prompt.
  5. To get the commands for an action within UCSM, perform the steps as you would want within UCS GUI. e.g. Create a VLAN or Add a VLAN to vNIC template. If you are familiar with Excel Micros then this step would be something similar.
  6. After few seconds, UCS Powertool will spit out the cmdlets for the action you just performed in UCSM GUI.
If you have a long list of VLANS to add then best to stick it in an Excel spreadsheet and do what I did below and then save full commands as filename.ps1:

Excel UCS concatenate cmdlets

In some cases, where you already have bunch of VLANs within UCS and you wish to add some of it to VLAN Groups, then it’s easier to export the names to a CSV from the screen below and do what I did with Excel above to concatenate.

UCSM VLAN Export CSV
Some other common cmdlets in UCS Powertool are:
  • Get-Ucsblade
  • Get-UcsServiceProfile
  • Connect-UcsServiceProfile -ServiceProfile ServiceProfileName -Blade ServerID
  • Full reference list of Reference guide for Powertool can be found here for version 1.x.
You can check the operational status of the cluster and Fabric Interconnects using “Get-ucsfimodule ¦ select descr,operstate“.

Cisco UCS Powertool status


UCS POWERTOOL SCRIPTS EXAMPLE

Download instruction at end of this table!
1Power OFF unassociated UCS BladesThis script will enable you to power down un-associated blades by creating temporary service profiles. You’ll be surprised how much power you can save in a large server estate if you have unused UCS blades.
2UCS AD Authentication IntegrationPowershell script to automate LDAP / Active Directory integration of UCSM.
3UCS Inventory ToolPopulates spreadsheet with extracted hardware information from UCS as an inventory.
4Quick Launch UCSM GUI PowerShell ScriptConnect to UCSM GUI without asking for login prompt. This creates a secure credential file so it bypasses default login process.
5Multi-Domain UCS Backup ScriptLogin multiple UCS domains and take all 4 types of back ups.
6Set User Labels for ServersCreate user labels for rack and blade servers for better inventory.
7UCS WWPN Collector ScriptPowershell script to output WWPN and vHBA details for each service profiles. Usually handy if you need to pass this information to SAN administrator for Zoning.
8UCS Serial Number Export Script Useful tool to if you need all the serial numbers to register with SmartNet.
9Generate SAN Zones for Brocade or MDS Collect Aliases, Zones and Zone Sets for Cisco MDS/Nexus or Brocade.
10Checks the current bandwidth of all adapters Displays details of bandwidth on all the vNIC adapters.
 Download these and more powershell scripts Powershell script samples
Let us know if you are trying to script a task using this tool.

No comments:

Post a Comment

Vmware NSX SSL creation 

Using OpenSSL for NSX Manager SSL import: Creates CSR and 4096 bit KEY Creating NSX 6.4.2 SSL    openssl req -out nsxcert.csr -newkey rsa:40...