Cisco Confidential 1 © Cisco and/or its affiliates. All rights reserved. Load Presentation onto my communities page Start UCSPE (Make sure it is at factory) Open UCSM GUI VPN to CMI Lab RDP to TechEd2014 (Make sure names are at default) Open PowerGUI Open Scripts: Add-UcsVlans.ps1 Add-UcsDomain.ps1 Data-Laptop Emulator.ps1 New-UcsFcZoning.ps1 !TechEd-Manual-UCStoWindowsNicName v ps1 Pre-Session Check-List
Cisco UCS PowerTool Joe Martin Consulting Systems Engineer, CCIE #5917 TechEd 2014 An introduction to PowerShell automation for Cisco UCS
Cisco Confidential 3 © Cisco and/or its affiliates. All rights reserved. UCSM…What is it? What is PowerTool Where to download How to download How to install How to learn to use Sample and example scripts Q&A – Along the way (Don’t be shy!) Agenda Link to slides at end of presentation
Cisco Confidential 4 © Cisco and/or its affiliates. All rights reserved. UCSM = Programmatic Infrastructure = SDC (Software Defined Compute) XML API UCS Manager is an API not a GUI or CLI…but it has those Comprehensive XML API, standards-based interfaces Bi-Directional access to physical & logical internals System Status Physical Inventory Logical Inventory Direct Customer Custom- Self Serve portals Management Tools Auditing Tools 3 rd Party System Center- SCOM/VMM/Orch PowerShell
Cisco Confidential 5 © Cisco and/or its affiliates. All rights reserved. PowerShell modules for Cisco UCS Servers Available for UCS managed systems and stand-alone C-Series PowerTool for UCSM is automatically generated by our XML schema Free to download from PowerTool for UCSM contains 1866 cmdlets Can do 100% of UCSM with PowerTool Follows Microsoft best practices Easy to learn how to use…I promise! What is PowerTool
Cisco Confidential 6 © Cisco and/or its affiliates. All rights reserved. Hardware VLANs, LAN Uplink, SAN Uplink, Server, Appliance Ports, Port Channels, etc. Pools Servers, UUID, MAC, IP, WWPN, WWNN, iSCSI, etc. Policies BIOS, Firmware, Adapters, Boot, Drives, etc. Templates vNIC, vHBA, Service Profile Templates, etc. Reporting vNIC Statistics, vHBA Statistics, Thermal, Resources, etc. Depth of PowerTool Capabilities
Cisco Confidential 7 © Cisco and/or its affiliates. All rights reserved. Go to Log in using your CCO credentials If you don’t have credentials it’s easy to register Select ‘Support’ then ‘All Downloads’ In Find type: PowerTool and select ‘Cisco UCS Management Partner Ecosystem Software’ Click on ‘Unified Computing System (UCS) PowerTool’ Select ‘Cisco IMC PowerTool pack for Powershell’ for Stand-Alone C-Series or ‘Cisco PowerTool pack for Powershell’ for UCSM Select ‘Download’ Downloading
Cisco Confidential 8 © Cisco and/or its affiliates. All rights reserved. Launch installer Next> Accept license agreement, Next> Install Location, Next> Install Accept UAC Finish Installing PowerTool
Cisco Confidential 9 © Cisco and/or its affiliates. All rights reserved. Import-Module CiscoUcsPs Load module Get-Command -Module CiscoUcsPs | Out-File.\CiscoUcsPs_Cmdlets.txt List of cmdlets Get-Command -Module CiscoUcsPs | Measure-Object How many cmdlets Get-Help -full Using PowerTool
Cisco Confidential 10 © Cisco and/or its affiliates. All rights reserved. Open UCSM GUI Import-Module CiscoUcsPs Enter ConvertTo-UcsCmdlet in a PowerShell session This cmdlet will run forever till stopped Do something in the UCSM GUI and hit ‘Save’ Watch your PowerShell session now First time is a bit slow to produce output…be patient Will see the PowerShell for that UCSM configuration Easy to Learn Demo
Cisco Confidential 11 © Cisco and/or its affiliates. All rights reserved. Log into a UCSM domain $cred = Get-Credential $myucs = read-host “Enter UCSM Hostname or IP” $mycon = Connect-Ucs -Name $myucs -Credential $cred #do your thing Disconnect-Ucs Log into multiple UCSM domains $multilogin = Set-UcsPowerToolConfiguration -SupportMultipleDefaultUcs $true $cred = Get-Credential $myucs $mycon = Connect-Ucs -Name $myucs -Credential $cred #do your thing Disconnect-Ucs Logging into UCSM
Cisco Confidential 12 © Cisco and/or its affiliates. All rights reserved. From our learning on ConvertTo-UcsCmdlet we got Get-UcsLanCloud | Add-UcsVlan -CompressionType "included" - DefaultNet "no" -Id 99 -McastPolicyName "" -Name "test" - PubNwName "" -Sharing "none" } Strip down to what we need Get-UcsLanCloud | Add-UcsVlan -Id 99 -Name "test“ Script it $VLANList = Import-Csv “.\VLANList.csv“ foreach ($item in $VLANList) {Get-UcsLanCloud | Add-UcsVlan -Id $item.VLAN -Name $item.Name} Bringing it Together Demo
Cisco Confidential 13 © Cisco and/or its affiliates. All rights reserved. Build a complete UCS in just a few minutes Answer file based = repeatable, consistent Configures 100% of UCS Zone your SAN in minutes Build 5120 zones with aliases across 2 MDS fabrics in 42 minutes Writes 5120 zones with aliases to file in under 1 minute Rename your Windows NICs in seconds Renames physical vNICs and Hyper-V vSwitches Demos Demo
Cisco Confidential 14 © Cisco and/or its affiliates. All rights reserved. PowerTool Documentation ols/C-Series/powertools/ucs_powertool_book/ucs_pwrtool_bkl1.pdf ols/C-Series/powertools/ucs_powertool_book/ucs_pwrtool_bkl1.pdf Forums nagement/cisco_ucs_developed_integrations nagement/cisco_ucs_developed_integrations My Script Repository / This slide deck Resources
Thank you. Joe Martin Consulting Systems Engineer, CCIE #5917 Cisco Systems Tel: Slides and Scripts: /people/joemar/content