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:
Windows PowerShell is built on top of the .NET Framework common language runtime (CLR) and the .NET Framework. It accepts and returns .NET Framework objects.
To work with PowerShell, you must install the Cisco UCS Director PowerShell console on any Windows-based system that supports the following:
The Cisco UCS Director PowerShell Console is an executable file that is installed as an application on the desktop. You can download the file from Cisco software download site. To install Cisco UCS Director PowerShell Console, do the following:
Step 1 | Navigate to https://software.cisco.com/download/release.html to download the latest version of Cisco UCS Director PowerShell Console executable file to your Windows desktop.
Only registered customers can download the software. | ||
Step 2 | Double-click the executable file to launch the installer and follow the instructions to install the PowerShell Console. | ||
Step 3 | Verify that Cisco UCS Director module has been installed by using the Get-Module command. The command displays the type, version, and name of the Cisco UCS Director module.
Example: PS C:\Program Files (x86)\Cisco\Cisco UCS Director PowerShell Console\Modules\CiscoUcsdPS> Get-Module ModuleType Version Name ExportedCommands ---------- ------- ---- --------------- Binary 5.3.1.0 CiscoUcsdPS {Invoke-userAPICan... PS C:\Program Files (x86)\Cisco\Cisco UCS Director PowerShell Console\Modules\CiscoUcsdPS>
| ||
Step 4 | Alternatively, you can download the PowerShell Console executable file directly from Cisco UCS Director by navigating to . |
You must configure the environment variables in the PowerShell console to run the cmdlets against the Cisco UCS Director server. All cmdlets accept the IP address of Cisco UCS Director and the REST Key as optional parameters. If you do not specify these parameters, the cmdlets choose their targets from the PowerShell environment variables UCSD_SERVER and UCSD_RESTKEY.
You can configure the environment variables using the SetEnvironmentVariable method as follows:
[Environment]::SetEnvironmentVariable("UCSD_SERVER","10.1.1.1","User") [Environment]::SetEnvironmentVariable("UCSD_RESTKEY","562FDF763A384E78B9BAB7FE02CA13B6","User")
You can retrieve the configured environment variables using the GetEnvironmentVariable command as follows:
[Environment]::GetEnvironmentVariable("UCSD_RESTKEY","User")
Note | For environment variable changes to take effect, close the PowerShell console and open it again. |