Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
check_ps_version.png Complete restructure Jun 6, 2019
create_vm_v3_basic.ps1 Complete restructure Jun 6, 2019
readme.rst Complete restructure Jun 6, 2019
script_output.png Complete restructure Jun 6, 2019


Nutanix Developer Portal Code Samples - PowerShell

To use the PowerShell code samples, the following environment is recommended.

  • Windows PowerShell 5.1 or later
  • A suitable PowerShell editor, e.g. Microsoft Visual Studio Code or Visual Studio Community. Instructions for extending Visual Studio Code with PowerShell support are provided below.
  • An alternative editor, built into some versions of Windows, is PowerShell ISE
  • Access to a Nutanix Cluster for API testing purposes.
  • Nutanix Community Edition is supported but may not always provide the exact same APIs as a "full" Nutanix cluster.


Please note that instructions provided in this repository will assume the use of Visual Studio Code software.

PowerShell Script Usage

The provided PowerShell scripts are designed to be standalone and can be run without additional dependencies.

The examples and screenshots below are from the create_vm_v3_basic.ps1 sample.

  1. Open Windows PowerShell (administrative permissions are not required).

  2. Verify your PowerShell version by entering $psversiontable or $PSVersionTable (the variable is not case-sensitive)

  3. Select View > Extensions.

  4. In the search field, enter PowerShell.

  5. Install the PowerShell extension created by Microsoft.

  6. Using the selected code sample, create a new PowerShell file (extension .ps1, by default).

  7. Select the $parameters.cluster_ip variable with the correct IP address/FQDN of your cluster (the scripts will prompt for credentials).

  8. Click Debug > Start Debugging.

  9. The script will run and prompt for a username and password in the Terminal window.

  10. After entering credentials, and if the request was successful, the JSON response will show a status as shown below.

You can’t perform that action at this time.