How to work with DreamCompute in Windows

It is possible to use the OpenStack command-line interface on a Windows computer by installing the following:

  • Python
  • pip
  • The OpenStack client

Once you've installed those three things and have set some environment variables for your Windows user, you can use Windows Command Prompt or Windows PowerShell to manage your DreamCompute project.

Windows PowerShell is a command line and scripting environment. It excels at task automation and configuration management.

For help installing/locating Windows PowerShell, see Microsoft's documentation here.

Step#1 — Install Python and pip

  1. Download the latest Python 2 release from Python's website:
  2. After clicking the most recent Python 2 release, choose to download the Windows X86-64 MSI Installer.
  3. Install Python by double-clicking the MSI package that you just downloaded and completing the installation wizard.

Make sure that the 'pip' and 'Add python.exe to Path' features will be installed on your local hard drive.

Step#2 — Install the OpenStack client

You must first open the command prompt in your version of Windows.

Windows 7

  1. Click the Start button, and then type 'cmd' in the search bar (where it says 'search for programs and files').

Windows 8 & 10

  1. Click the Windows logo while holding the R key at the same time.
    The run box appears.
  2. In the run box, type cmd and then hit the 'Enter' key.

In the command prompt, enter the following:

C:\Users\username> pip install python-openstackclient

Step#3 — Set environment variables

You now need to set environment variables for your Windows user so your OpenStack client commands are authenticated against your project. The easiest way to do this is to download your openrc file, modify/re-save it as a Windows batch file, and execute it once.

Downloading your openrc file

View the following article for instructions:

Modify the file

Once you've downloaded your openrc file, you'll need to modify/re-save it as a batch file. Open the file in a text editor like Notepad and remove everything except the following lines:

export OS_AUTH_URL=
export OS_TENANT_ID=tenantid
export OS_TENANT_NAME="tenantname"
export OS_USERNAME="username"

Make the following adjustments to the file:

  • Replace all instances of 'export' with 'setx'
  • Place double quote marks (") around all of your variable values (i.e. '', 'tenantid', etc.).

The file should now look like this:

setx OS_AUTH_URL ""
setx OS_TENANT_ID "tenantid"
setx OS_TENANT_NAME "tenantname"
setx OS_USERNAME "username"

Save the file with the extension 'bat' (example: dhc-123456-openrc.bat).

Make sure that the file isn't saved with an additional .txt extension or Windows will not be able to execute the script.

Execute the file

You must now execute the script as an administrator. Locate the saved file in Windows Explorer, right-click, and select the 'Run as administrator' option.

After running the script, all necessary environmental variables should be set. You can now use the OpenStack command line client to manage your DreamCompute project. For a review of some of the basic commands, view the following article:


If you're having issues connecting, double-check your environment variables. You can do this either from the System Properties Control panel area, Windows PowerShell, or the Windows Command Prompt. In Windows PowerShell, run this command:

C:\Users\username> Get-ChildItem Env:OS_*
Name                           Value
----                           -----
OS_USERNAME                    username
OS_TENANT_NAME                 tenantname
OS_TENANT_ID                   tenantid

In Windows Command Prompt, run this command:

C:\Users\username> set|findstr OS_

Did this article answer your questions?

Article last updated .