You can use the guestinfo variables to query information such as version and build information.

For guestinfo samples-related PowerCLI scripts, see PowerCLI-Example-Scripts
Table 1. guestinfo Variables for VMware Tools
Variable Name Description

guestinfo.vmtools.description

Reports the version description.

guestinfo.vmtools.versionString

Reports the version string.

guestinfo.vmtools.versionNumber

Reports the version number.

guestinfo.vmtools.buildNumber

Reports the build number.

guestinfo.toolsInstallErrCode

Reports the error code of last VMware Tools installation.
Note: VMware Tools installation and upgrade on Windows often requires a reboot the guest operating system for the changes to take effect. If a reboot has not occurred, the guestinfo variable guestinfo.toolsInstallErrCode is set 3010.
guestinfo.driver.[driver name].version

For example,

guestinfo.driver.pvscsi.version

guestinfo.driver.vmhgfs.version

guestinfo.driver.vmxnet3.version

Reports the running version of the driver.

1.3.10.0

11.0.34.0

1.8.3.0