VMware Cloud Community
GuyMelanson
Contributor
Contributor

Using PowerCLI to remove NSX Network Introspection driver from Windows Server 2008/2012/2016 VMWare Tools

I've been tasked to remove the NSX Network Introspection driver from Windows Server 2008/2012/2016 VMWare Tools.

Need to complete this task on about 400 Virtual Machines.

Was told this awesome community might have the building blocks for a PowerCLI script I could use the help me fix our environment.

Tags (1)
Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership

Can you try like this?

This is only for 1 VM, but it can easily be included in a ForEach loop over all the target VMs.

$vmName = 'MyVM'

$installerOptions = '/S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=VShield"'


$vm = Get-VM -Name $vmName

$vm.ExtensionData.UpgradeTools($installerOptions)


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
bdmpastx
Contributor
Contributor

LucD, kruddy​ I wanted to elaborate on this...this $installeroptions string is not correct for the latest tools. It should be as follows. I don't know what version of the tools changed to this but this is true for the latest one and applies to any VM Windows 7 and newer.

$InstallerOptions= '/S /v "/qn REBOOT=R ADDLOCAL=ALL REMOVE=NetworkIntrospection"'

Do you guys know how to only modify the existing tools installation without the upgradetools() method? We have some VMs the require patching of the OS before the latest tools will install. So we would like to remove the Network Introspection without an update to the tools. I am sure I can do an invoke-vmscript but I would like to avoid that mess.

Reply
0 Kudos
LucD
Leadership
Leadership

Provided you don't clean up the MSI file cache, you could try something like this.
Note that the logging option (/L*V 'C:\Temp\install.log') is optional, and can be left out.

$tools = Get-WmiObject Win32_Product | Where{$_.Name -eq 'VMware Tools'}

msiexec.exe /qn /L*V 'C:\Temp\install.log' /i $tools.LocalPackage REBOOT=ReallySuppress REMOVE=NetworkIntrospection


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
bdmpastx
Contributor
Contributor

^^^I can see where this would be using invoke-vmscript in the VM though wouldn't it?^^^

Reply
0 Kudos