NGT PowerShell Update

  • 3 October 2017
  • 3 replies
  • 3114 views

Userlevel 1
Badge +1
I have created a script to automate the upgrade of Nutanix Guest Tools. With some organizations having hundreds or thousands of vms it becomes nearly impossible to upgrade them manually.

We use SCCM in conjuction with this script. SCCM checks versioning and runs the script. However, it can be run with other solutions. It can also be run manually on a VM for testing. Powershell must be Run-As-Administrator for the script to run without interaction. The VM must also have a CD drive attached to it.

To get started fill in your cluster name, username and password at the start of the script. If you open Explorer to "This PC" you will be able to see the tools mount to the CD drive and then unmount when complete.
This has been tested and verified on Windows Server 2016. It also works if the CD drive is set as a different drive other than the standard 😨.

Find the script here: https://github.com/Manimi-Chart/Nutanix-Guest-Tools-Update-with-PowerShell

3 replies

Userlevel 3
Badge +13
Great work!!! thanks Manimi_Chart
Badge +2
Great! We're also an SCCM shop, so this should work wonders for us. I'll check it out.

Thanks again!
Eric
Badge
Hmmm....
Invoke-RestMethod : Apache Tomcat/8.0.11 - Error reportH1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY
{font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color :
black;}.line {height: 1px; background-color: #525D76; border: none;} HTTP Status 401 - User should be authenticated
against OS user accounttype Status reportmessage User should be authenticated against OS user accountdescription This
request requires HTTP authentication.Apache Tomcat/8.0.11
At C:\NGTinstall.ps1:33 char:1
+ Invoke-RestMethod -Credential $cred -ContentType "application/json" - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Drive not mounted!
At C:\NGTinstall.ps1:50 char:5
+ Throw "Drive not mounted!"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Drive not mounted!:String) [], RuntimeException
+ FullyQualifiedErrorId : Drive not mounted!

Reply