VMware ESXi As Built Report is a PowerShell module which works in conjunction with AsBuiltReport.Core.
AsBuiltReport is an open-sourced community project which utilises PowerShell to produce as-built documentation in multiple document formats for multiple vendors and technologies.
The VMware ESXi As Built Report module is used to generate as built documentation for standalone VMware ESXi servers.
Please refer to the VMware vSphere AsBuiltReport for reporting of VMware vSphere / vCenter Server environments.
Please refer to the AsBuiltReport website for more detailed information about this project.
Below are the instructions on how to install, configure and generate a VMware ESXi As Built report.
The VMware ESXi As Built Report supports the following ESXi versions;
The following VMware ESXi versions are no longer being tested and/or supported;
This report is compatible with the following PowerShell versions;
Windows PowerShell 5.1 | PowerShell 7 |
---|---|
✅ | ✅ |
PowerShell 5.1 or PowerShell 7, and the following PowerShell modules are required for generating a VMware ESXi As Built report.
❗ If you are unable to install .NET Core, you must set ShowCoverPageImage
to False
in the report JSON configuration file.
A user with root privileges on the ESXi host is required to generate a VMware ESXi As Built Report.
Open a PowerShell terminal window and install each of the required modules.
install-module VMware.PowerCLI -MinimumVersion 12.3 -AllowClobber
install-module AsBuiltReport.VMware.ESXi
The ESXi As Built Report utilises a JSON file to allow configuration of report information, options, detail and healthchecks.
An ESXi report configuration file can be generated by executing the following command;
New-AsBuiltReportConfig -Report VMware.ESXi -Path <User specified folder> -Name <Optional>
Executing this command will copy the default ESXi report JSON configuration to a user specified folder.
All report settings can then be configured via the JSON file.
The following provides information of how to configure each schema within the report's JSON file.
The Report schema provides configuration of the ESXi report information
Sub-Schema | Setting | Default | Description |
---|---|---|---|
Name | User defined | VMware ESXi As Built Report | The name of the As Built Report |
Version | User defined | 1.0 | The report version |
Status | User defined | Released | The report release status |
ShowCoverPageImage | true / false | true | Toggle to enable/disable the display of the cover page image |
ShowHeaderFooter | true / false | true | Toggle to enable/disable document headers & footers |
ShowTableCaptions | true / false | true | Toggle to enable/disable table captions/numbering |
The Options schema allows certain options within the report to be toggled on or off
Sub-Schema | Setting | Default | Description |
---|---|---|---|
ShowLicenseKeys | true / false | false | Toggle to mask/unmask ESXi license keys Masked License Key *****-*****-*****-56YDM-AS12K Unmasked License Key AKLU4-PFG8M-W2D8J-56YDM-AS12K |
ShowVMSnapshots | true / false | true | Toggle to enable/disable reporting of VM snapshots |
The InfoLevel schema allows configuration of each section of the report at a granular level. The following sections can be set
There are 6 levels (0-5) of detail granularity for each section as follows;
Setting | InfoLevel | Description |
---|---|---|
0 | Disabled | Does not collect or display any information |
1 | Enabled / Summary | Provides summarised information for a collection of objects |
2 | Adv Summary | Provides condensed, detailed information for a collection of objects |
3 | Detailed | Provides detailed information for individual objects |
4 | Adv Detailed | Provides detailed information for individual objects, as well as information for associated objects (Hosts, Clusters, Datastores, VMs etc) |
5 | Comprehensive | Provides comprehensive information for individual objects, such as advanced configuration settings |
The table below outlines the default and maximum InfoLevel settings for each section.
Sub-Schema | Default Setting | Maximum Setting |
---|---|---|
VMHost | 3 | 5 |
Network | 3 | 4 |
Storage | 3 | 4 |
VM | 3 | 4 |
The Healthcheck schema is used to toggle health checks on or off.
The VMHost schema is used to configure health checks for VMHosts.
Sub-Schema | Setting | Default | Description | Highlight |
---|---|---|---|---|
ConnectionState | true / false | true | Checks VMHosts connection state | Maintenance Disconnected |
HyperThreading | true / false | true | Highlights VMHosts which have HyperThreading disabled | HyperThreading disabled |
ScratchLocation | true / false | true | Highlights VMHosts which are configured with the default scratch location | Scratch location is /tmp/scratch |
IPv6 | true / false | true | Highlights VMHosts which do not have IPv6 enabled | IPv6 disabled |
UpTimeDays | true / false | true | Highlights VMHosts with uptime days greater than 9 months | 9 - 12 months >12 months |
Licensing | true / false | true | Highlights VMHosts which are using production evaluation licenses | Product evaluation license in use |
SSH | true / false | true | Highlights if the SSH service is enabled | TSM / TSM-SSH service enabled |
ESXiShell | true / false | true | Highlights if the ESXi Shell service is enabled | TSM / TSM-EsxiShell service enabled |
NTP | true / false | true | Highlights if the NTP service has stopped or is disabled on a VMHost | NTP service stopped / disabled |
StorageAdapter | true / false | true | Highlights storage adapters which are not 'Online' | Storage adapter status is 'Unknown' Storage adapter status is 'Offline' |
NetworkAdapter | true / false | true | Highlights physical network adapters which are not 'Connected' Highlights physical network adapters which are 'Down' |
Network adapter is 'Disconnected' Network adapter is 'Down' |
LockdownMode | true / false | true | Highlights VMHosts which do not have Lockdown mode enabled | Lockdown Mode disabled |
The Datastore schema is used to configure health checks for Datastores.
Sub-Schema | Setting | Default | Description | Highlight |
---|---|---|---|---|
CapacityUtilization | true / false | true | Highlights datastores with storage capacity utilization over 75% | 75 - 90% utilized >90% utilized |
The VM schema is used to configure health checks for virtual machines.
Sub-Schema | Setting | Default | Description | Highlight |
---|---|---|---|---|
PowerState | true / false | true | Highlights VMs which are powered off | VM is powered off |
ConnectionState | true / false | true | Highlights VMs which are orphaned or inaccessible | VM is orphaned or inaccessible |
CpuHotAdd | true / false | true | Highlights virtual machines which have CPU Hot Add enabled | CPU Hot Add enabled |
CpuHotRemove | true / false | true | Highlights virtual machines which have CPU Hot Remove enabled | CPU Hot Remove enabled |
MemoryHotAdd | true / false | true | Highlights VMs which have Memory Hot Add enabled | Memory Hot Add enabled |
ChangeBlockTracking | true / false | true | Highlights VMs which do not have Change Block Tracking enabled | Change Block Tracking disabled |
SpbmPolicyCompliance | true / false | true | Highlights VMs which do not comply with storage based policies | VM storage based policy compliance is unknown VM does not comply with storage based policies |
VMToolsStatus | true / false | true | Highlights Virtual Machines which do not have VM Tools installed, are out of date or are not running | VM Tools not installed, out of date or not running |
VMSnapshots | true / false | true | Highlights Virtual Machines which have snapshots older than 7 days | VM Snapshot age >= 7 days VM Snapshot age >= 14 days |
# Generate an ESXi As Built Report for ESXi server 'esxi-01.corp.local' using specified credentials. Export report to HTML & DOCX formats. Use default report style. Append timestamp to report filename. Save reports to 'C:UsersTimDocuments'
PS C:> New-AsBuiltReport -Report VMware.ESXi -Target 'esxi-01.corp.local' -Username 'root' -Password 'VMware1!' -Format Html,Word -OutputFolderPath 'C:UsersTimDocuments' -Timestamp
# Generate an ESXi As Built Report for ESXi server 'esxi-01.corp.local' using specified credentials and report configuration file. Export report to Text, HTML & DOCX formats. Use default report style. Save reports to 'C:UsersTimDocuments'. Display verbose messages to the console.
PS C:> New-AsBuiltReport -Report VMware.ESXi -Target 'esxi-01.corp.local' -Username 'root' -Password 'VMware1!' -Format Text,Html,Word -OutputFolderPath 'C:UsersTimDocuments' -ReportConfigFilePath 'C:UsersTimAsBuiltReportAsBuiltReport.VMware.ESXi.json' -Verbose
# Generate an ESXi As Built Report for ESXi server 'esxi-01.corp.local' using stored credentials. Export report to HTML & Text formats. Use default report style. Highlight environment issues within the report. Save reports to 'C:UsersTimDocuments'.
PS C:> $Creds = Get-Credential
PS C:> New-AsBuiltReport -Report VMware.ESXi -Target 'esxi-01.corp.local' -Credential $Creds -Format Html,Text -OutputFolderPath 'C:UsersTimDocuments' -EnableHealthCheck
# Generate a single ESXi As Built Report for ESXi servers 'esxi-01.corp.local' and 'esxi-02.corp.local' using specified credentials. Report exports to Word format by default. Apply custom style to the report. Reports are saved to the user profile folder by default.
PS C:> New-AsBuiltReport -Report VMware.ESXi -Target 'esxi-01.corp.local','esxi-02.corp.local' -Username 'root' -Password 'VMware1!' -StylePath 'C:ScriptsStylesMyCustomStyle.ps1'
# Generate an ESXi As Built Report for ESXi server 'esxi-01.corp.local' using specified credentials. Export report to HTML & DOCX formats. Use default report style. Reports are saved to the user profile folder by default. Attach and send reports via e-mail.
PS C:> New-AsBuiltReport -Report VMware.ESXi -Target 'esxi-01.corp.local' -Username 'root' -Password 'VMware1!' -Format Html,Word -OutputFolderPath 'C:UsersTimDocuments' -SendEmail