Navigation:  Remote Monitoring and Management > Proactive Monitoring > Windows Server and Workstation Monitoring > 24x7 Checks > Script Check > Default Script Checks > Virtualisation >

VMware ESXi Virtual Machine Inventory

Previous pageReturn to chapter overviewNext page

 

Script Type: PowerShell

 

This script queries the ESXi server, returning various health indicators for all Virtual Machines.

 

When configuring the Check, in addition to the Host, Username, Password and Script timeout, there is the option to Fail if any Virtual Machine is not powered on

 

VM Name

Powered On

RAM Allocated

RAM Usage

CPU Usage

Network Usage

Network Received

Network Transmitted

Disk Allocated

Disk Usage

 

This is then displayed in the More Information... section of the Script Check:

 

clip0841clip0824

 

 

Requirements

Our VMware ESXi scripts are supported on ESXi 6.5 or earlier.

 

The script uses the VMware CIM / SMASH API including the WSMAN library which is not supported on XP, 2003 or earlier Operating systems.

 

In addition to this, Microsoft .Net 3.5 (or higher), PowerCLI and PowerShell 2.0 (or later) must be installed on the device the scripts will be executed from.

 

Additionally for PowerShell scripts Microsoft .Net 3.5 (or higher), PowerCLI and PowerShell 2.0 (or later) must be installed on the device the scripts will be executed from.

Please note: PowerCLI is supported up to version 6.0. Later versions of PowerCLI (from 6.3) are currently unsupported and may results in unexpected results when running Checks.

 

We suggest running this script from machines running Agent 8.16.1RC or later.

 

PowerShell: the use of $ and other special characters in the password

Consideration must be given when passing passwords that contain special characters through PowerShell to ensure they are handled as literal strings.

 

For example if the password contains a dollar sign ($) it must either be preceded by a grave accent ` (also known as a backtick: ASCII code 96 - Alt+96) or the password encapsulated in single ' ' to pass the password to PowerShell exactly as entered.

 

Password Example

String

Result

pas$word

pas

pas`word

pas$word

'pas$word'

pas$word

 

Where the password contains a special character (in this example dollar sign) but no preceding grave accent, or is not encapsulated in single quotes, the message Failed to connect – Credentials invalid is returned.

 

Note: some PowerShell special characters are themselves constructed using a grave accent so should be encapsulated in single quotes when passed via the Script and these are covered in the Microsoft Technet article: about_Special_Characters

 

Further information on Escape_Characters and Quoting_Rules is available from Microsoft's Technet

 

Please be aware that we are not responsible for the content of external sites.