This question came up last week asking for a programmatic method to identify whether NSX-V or NSX-T is deployed in your environment. With NSX-V, vCenter Server is a requirement but for NSX-T, vCenter Server is not a requirement, especially for multi-hypervisor support. In this post, I will assume for NSX-T deployments, you have configured a vCenter Compute Manager.

Both NSX-V and NSX-T uses the ExtensionManager API to register themselves with vCenter Server and we can leverage this interface to easily tell if either solutions are installed. NSX-V uses the com.vmware.vShieldManager string to identify itself and NSX-T uses the com.vmware.nsx.management.nsxt string to identify itself.

Here is a quick PowerCLI snippet that demonstrates the use of the vSphere API to check whether NSX-V or NSX-T is installed and provides the version shown in the registration:

$extensionManager = Get-View ExtensionManager foreach ($extension in $extensionManager.ExtensionList) { if($extension.key -eq "com.vmware.vShieldManager") { Write-Host "NSX-V is installed with version"$extension.Version } elseif($extension.key -eq "com.vmware.nsx.management.nsxt") { Write-Host "NSX-T is installed with version"$extension.Version } } 1 2 3 4 5 6 7 8 9 $ extensionManager = Get - View ExtensionManager foreach ( $ extension in $ extensionManager . ExtensionList ) { if ( $ extension . key - eq "com.vmware.vShieldManager" ) { Write - Host "NSX-V is installed with version" $ extension . Version } elseif ( $ extension . key - eq "com.vmware.nsx.management.nsxt" ) { Write - Host "NSX-T is installed with version" $ extension . Version } }

Here is a screenshot from my environment which has both NSX-V (6.4) and NSX-T (2.1) installed:



Note: Due to some current testing, I have not upgraded my NSX-T deployment to the latest 2.2 release, so I do not know if the version gets bumped to match the actual released version