VM deployment through powershell cmdlets 2.0.1 automation | Nutanix Community
Skip to main content

Hi Team

I am trying to automate the VM creation through Powershell Cmdlets. I can see there are two different version of Powershell Cmdlets are present https://portal.nutanix.com/page/documents/details?targetId=PS-Cmdlets-AOS-v6_6:ps-ps-cmdlets-c.html

From the document, I observed that Powershell 2.0.1 supports execution of these cmdlets from Ubuntu and Mac along with Windows which is not the case in first version. The first version is only works from a Windows machine. But there is a significant difference between the Powershell Cmdlets present in V1 and V2.

Can you please let me know do we have any limitation wrt Cmdlets if we use V2 or we can do all the operations that can be done by V1? If V2 have certain limitation then do we need to use the SDK or API in order to automate the task?

 

Thanks

@Kcmount can you please help here.


Hey,

From the docs it should be:

V1 for Prism Element 

V2 for Prism Central

If you can do your tasks using V2 that's good because it'd be able to work across multiple clusters that are registered to the PC you're speaking to.

 

This is similar to the API where V2 API is for Prism Element and V3 is for Prism Central.

V4 API is the future though https://www.nutanix.dev/


Thnx for your quick repsone.


@Kcmount Sorry to say but I have another doubt. If I have installed V2 to work with Prism Central then can I execute V1 cmdlets to get my work done or I need to execute V2 cmdlets only?

Do I need to install the below module if I am trying to do the automation using V2. I can see in multiple places it was mentioned to include this rather than use Connect-PrismCentral. While trying to install this module I got the below error as well.

Install-Module -Name NutanixCmdletsPSSnapin

 

Install-Package: No match was found for the specified search criteria and module name 'NutanixCmdletsPSSnapin'. Try Get-PSRepository to see all available registered module repositories.

Please help.