Solved

PowerShell Cmdlets Update?


Are there ANY plans to expand on the PowerShell cmdlets at all, specifically for getting host info? They’re pretty bare bones. I don’t even know the last time the cmdlets were updated/expanded. It seems to me Nutanix regrets making them and hopes they will quietly die.

I have relied heavily on PowerShell to keep tabs on a very large Nutanix environment running Nutanix on both AHV and ESXi. I’m talking 700+ nodes. The ESXi clusters are no problem getting the info from because I use VMware’s PowerCLI to supplement the lack of data I can get with Nutanix Cmdlets, but the AHV clusters are another story since I don’t have PowerCLI to fall back on. Can we at least get a cmdlet that will allow us to use PowerShell to initiate ncli or acli commands, like VMware does with the “Get-EsxCLI” cmdlet. That would be very helpful.

icon

Best answer by MrMike 1 May 2020, 21:22

It looks like there was interest in a rewrite of the cmdlets but interest seems to have been lost 2 years ago? https://github.com/nutanix/PowerShell

View original

15 replies

Userlevel 1
Badge +1

Agreed.  Our management is pushing to switch to AHV as primary hypervisor and I’ve been working to convert my PowerCLI scripts to work with AHV environments and hitting a lot of roadblocks.

 

If Nutanix wants to seriously challenge VMware in this space, particularly on a large enterprise level, they need to put in an effort to mature their PowerShell cmdlets a lot more. Also, they should have a module and not the snapins they currently use.

Userlevel 4
Badge +4

My personal sentiment is a 100% agree. PowerShell is one place for multiple modules. Nearly every technology has cmdlets nowadays and they are easy to learn and use.

Nutanix cmdlets are built on APIs solely. Meaning if the functionality is not represented in APIs then it won’t be in cmdlets either.

I like the idea of having Nutanix PowerShell cmdlets being able to integrate with ESXi CLI. Let me do some research and see if there is sufficient support to push this as a feature.

As per snapins vs module, what would be the motivation? Please help me understand how would it benefit you if Nutanix cmdlets were packaged in a module rather then a snapin?

 

Thanks Alona.

 

I would like to clarify that I’m not looking for Nutanix PowerShell cmdlets to integrate with ESXi CLI. I’m saying that it would be nice if Nutanix PowerShell cmdlets had their own version of the Get-EsxCLI command.

 

For example,  it would be nice if I there was a cmdlet like, Get-ACLI or Get-NCLI. I could then use that command to get any kind of data that I would from ACLI or NCLI and then take those outputs and use them in my scripts as needed.

 

I’m not a PowerShell expert but some reasons to switch to modules over a snapin:

  1. Snapins require installation/registration. Modules don’t.
  2. You can autoload modules but not Snapins.
  3. Snapins are deprecated/legacy.
  4. Snapins lack the ability to explicitly define dependencies.
  5. The commands in a module are easier to find. The Get-Command cmdlet gets all commands in all installed modules, even if they are not yet in the session, so you can find a command and use it without importing.

Hi,

I agree with the snapin, it is no more available in PowerShell 7.

Also, cmdlets to manage AHV, CVM, ACLI and NCLI command would be very useful.

just run in to the same issue,I am looking to move to PSv7 and visual studio code and I cant load the snapins :(

Also, just creating a basic snapshot seems so complicated! The help says new-ntnxsnapshot -server [string], but it wont accept the name of the server as the string!

 

Andy

Badge +1

just run in to the same issue,I am looking to move to PSv7 and visual studio code and I cant load the snapins :(

Also, just creating a basic snapshot seems so complicated! The help says new-ntnxsnapshot -server [string], but it wont accept the name of the server as the string!

 

Andy

What version of the cmdlets do you have because I am not seeing a -server parameter for the new-ntnxsnapshot cmdlet.  This should work though https://next.nutanix.com/scripts-32/create-vm-snapshot-via-powershell-new-ntnxsnapshot-noob-alert-31485

Badge +1

It looks like there was interest in a rewrite of the cmdlets but interest seems to have been lost 2 years ago? https://github.com/nutanix/PowerShell

Aaaaand it looks like Nutanix is going to quietly avoid this subject again. As @MrMike mentioned, it looks like they abandoned it after stating in the above link “Nutanix is committed to making PowerShell a first-class feature.” I don’t believe them.

@Alona, any updates?

Userlevel 4
Badge +4

@JasonStenack would you believe me if I said that I want Nutanix PS integration to be awesome probably even a little more than you do?

I accidentally marked mdupoge’s comment as the best answer. Hopefully, moderators will be able to undo that mistake.

Let me see what I can dig up on the PS subject and then hopefully log the above as improvement request. In the meantime you could do the same: go to the Nutanix portal and log a feature request. Make sure to provide as much validation and reasoning as you possibly can. This will help with speeding things up as the request would come from a customer directly.

Hi Alona - I think that Powershell scripts are extremely important, especially if AHV is expected to be comparable to other hypervisors like VMWare and Hyper-V. I work on the sales engineering side and with AHV frequently. Can you Slack me so we can discuss getting this escalated internally? Thank you.

I’m in the same boat as many here. Would like to see modules instead of a snapin. PS7 is upon us. 

Userlevel 4
Badge +4

@TimGaray@JasonStenack@MrMike@Slothy2406 

Ok, some good news from the product management perspective. PS Revamp is actually in progress. I’m not allowed to set the expectations but if all goes as planned (I have my fingers and toes crossed!) it’s due soon.

I am relaying the requirements and sharing as many details as I can. I’ll add here if/when I have more.

@Alona some other feature requests in addition to above:

 

  1. It would be nice if connecting to Prism Central to pull info about clusters was fleshed out better. For example there is no easy way to connect to PC and get cluster info for clusters PC manages. If I use the get-ntnxcluterinfo cmdlet in PC it just returns details about the PC cluster. It would be nice to be able to specify which cluster I want cluster info on, like “get-ntnxclusterinfo -Name <name of cluster PC manages>”. I look at PC as Nutanix’s version of vCenter. I’d prefer to connect to that one source and pull all my data through there instead of looping through potentially dozens of individual clusters. The best I was able to do is log into PC, run the get-ntnxcluster command to retrieve a list of all the clusters it manages, disconnect from PC, then loop through the list of individual clusters and establish new connections to them. That’s really clunky. The hierarchical approach VMware uses with vCenter and the datacenters/clusters it manages is far superior.
  2. A much easier method of getting the host uptime would be nice. I was eventually able to figure it out with that weird Epoch time format (unix time) provided by get-ntnxhost and converting everything is a real pain in the butt! I just want simple host uptime in number of days.
  3. It would be nice to be able see what kind of drivers are installed on the host and their versions so I can pipe them out to a CSV. To be fair, VMware doesn’t have this either, per se, but they have the work around with the “Get-EsxCLI -VMhost <vmhostname> -V2” command. It is nice to be able to get a list of all the driver versions for the Intel nics on my hosts, for example, if I know there is an incompatibility out there that I need to be aware of. Can't do that right now with AHV and powershell cmdlets.
  4. I would also like to be able to find out what version of Foundation and LCM is installed in the cluster. I can get NCC and hypervisor versions, why not Foundation and LCM?
Userlevel 4
Badge +4

I hear you, Jason. All of these sound very reasonable to me. Ability to quickly build reports on firmware, drivers and change scopes is a matter of convenience. Convenience saves times and increases efficiency. Efficiency is why we use PS in the first place. I’m with you on that. I can’t promise anything but let me communicate those points back and see the outcome.

So far what I was able to find out is that most of what is being expected is in the list of upcoming improvements already.

Let’s see if these have the same status.

Reply