Pages

Monday, February 6, 2017

VmWare Tools status from Virtual Machines

Get VmWare Tools status from Virtual Machines

Here is a simple PowerCli script which can be used to get the status of VmWare Tools on one or more virtual machines.


################################################################################################################
# The following Script can be used to fetch details about VmWare tools running on one or more virtula machines.
# Name of VM(s) can be specified at command prompt as parameter which is capable of accepting multiple VMs
# Make sure you are connected to the VC before attepting to run this script.
# This script will show the output on the console itself
# if you need the report in file then replace "ft -autosize" with export-csv -notypeinformation VMTools.csv
################################################################################################################
param(
[string[]]$ServerName
)
$ServerName |foreach
{
    $ComputerName = $_
    (get-vm $ComputerName).extensiondata.guest
} |select @{Name ="VMName" ; Expression = {"$ComputerName"}},ToolsStatus,ToolsVersionStatus,ToolsRunningStatus,ToolsVersion |ft -AutoSize




Sample Screenshot:



 Points to consider
  • Please make sure you are connected to the Virtual Center on PowerCli console before attempting to run this script.

No comments:

Post a Comment