Get Dell iSM & PTAgent Versions with PowerShell? | Nutanix Community
Skip to main content

I need to get the iSM and PTAgent versions from AHV clusters running on the Dell XC platform using PowerShell cmdlets. Does anyone know if this is possible? I can’t figure it out and do not think it is possible at this point.

Hi @JasonStenack 

Please check the command below, this should get you started. 

Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -match 'DellPTAgent'} | Select-Object DisplayVersion, DisplayName, InstallDate | ConvertTo-Json

If this does not work, I suppose you are hitting an issue we have noticed where LCM fails to populate the ISM and PTAgent versions due to python version being installed automatically is a 32 bit process and the DELL’s PTAgent/ISM is a 64 bit installation when done manually. 

Read thru KB-8701 

Let me know if this help !!

 

Cheers


These nodes are all running AHV, not Hyper-V. Don’t think this will work.

 

Also, I need to be able to pull the information with the Nutanix PowerShell cmdlets so the results can be sent to a spreadsheet with a ton of other information I’m gathering. I’m managing hundreds of nodes and need to automate wherever I can.


Hi Jason,

 

There’s no Winrm interface on the AHV hosts for powershell to talk to. We use rpm commands run on the ahv hosts to get that version information manually, like this:

rpm -qa | grep -i ism

dcism-2.4.0-358.el6.x86_64

rpm -qa | grep -i ptagent DellPTAgent-1.3-0.7940.x86_64  

You would need to be able to ssh to the ahv hosts and run above commands and capture the output in your powershell script. 

 

I found this guy’s blog that seemed relevant to this topic:

 

https://www.jonathanmedd.net/2013/08/using-ssh-to-access-linux-servers-in-powershell.html

 

 


@sedwards, okay, so this is actually getting me somewhere, sort of. I downloaded the module and was able to successfully establish an ssh session to a CVM via PowerShell. However, it looks like it only supports certain commands, like “ls” or “df -h”. If I try to run something like “genesis status” then it comes back with “ cvm ip] had an error: bash: genesis: command not found.” But running a “hostname” command will return me back the CVM name and like I said above, df -h works and ls works so I am sure other common linux commands work too but nothing specific to Nutanix seems to function, unfortunately.

Similar result if I try to do a cluster status. I get “scvm ip] had an error: bash: cluster: command not found”

I don’t think I’ll be successful at getting PTagent or iSM versions if I can’t even pull a simple cluster status. I guess it is quite possible I am doing something wrong though.


@sedwards, Hahaha! Wow, I’m a dummy. Okay, so I don’t know what I was thinking but I was connecting into the CVM instead of AHV for some reason (Using the SSHSessions module) and after connecting into AHV insteadI was able to pull the information I was looking for. Thanks!

Now I wonder if I can use this on the CVM to connect to the PTAgent and pull firmware data instead of creating a cim-session directly to the iDRAC and pulling everything. Might be faster or at least use it as a backup in the event I can’t establish a cim-session.


Yes, you can use this to get firmware information from the PTAgent. I susscessfully did it after importing the SSHSessions module. Sample below:

 

$CvmCredentials = Get-Credential
$CvmCredentials | Export-Clixml -Path "${env:\userprofile}\CVM.cred"

$CvmCredentials = Import-Clixml -Path "${env:\userprofile}\CVM.cred"

$CvmIP = “x.x.x.x”

New-SshSession -ComputerName $CvmIP -Credential $CvmCredentials

$Inventory = Invoke-SshCommand -ComputerName $CvmIP -Command "curl -s -k H 'Content-Type:application/json' -X POST 'https://192.168.5.1:8086/api/PT/v1/host/inventory' --data {} | less"
$Inventory = $Inventory.result | ConvertFrom-Json

 

Now you can dig through the $Inventory object and grab whatever you need. For example, $inventory.iDRAC will display all the properties of the iDRAC, like firmware version. Pretty much anything that LCM displays or updates is available here.


Reply