• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
    PowerShell
  • License
    MIT License
  • Created about 6 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Repository for AsBuiltReport VMware vSphere module

Buy Me a Coffee at ko-fi.com

VMware vSphere As Built Report

VMware vSphere 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 vSphere As Built Report module is used to generate as built documentation for VMware vSphere / vCenter Server environments.

Please refer to the VMware ESXi AsBuiltReport for reporting of standalone VMware ESXi servers.

Please refer to the AsBuiltReport website for more detailed information about this project.

πŸ“š Sample Reports

Sample Report 1 - Default Style

Sample vSphere As Built report with health checks, using default report style.

Sample vSphere Report 1

Sample Report 2 - Custom Style

Sample vSphere As Built report with health checks, using custom report style.

Sample vSphere Report 2

πŸ”° Getting Started

Below are the instructions on how to install, configure and generate a VMware vSphere As Built report.

πŸ’Ύ Supported Versions

VMware vSphere

The VMware vSphere As Built Report supports the following vSphere versions;

  • vSphere 6.5
  • vSphere 6.7
  • vSphere 7.0
  • vSphere 8.0

End of Support

The following VMware vSphere versions are no longer being tested and/or supported;

  • vSphere 5.5
  • vSphere 6.0

PowerShell

This report is compatible with the following PowerShell versions;

Windows PowerShell 5.1 PowerShell 7 ^
βœ… βœ…

^ Due to compatibility issues, VMware Update Manager information will not be reported when using PowerShell 7

πŸ”§ System Requirements

PowerShell 5.1 or PowerShell 7, and the following PowerShell modules are required for generating a VMware vSphere As Built report.

Each of these modules can be easily downloaded and installed via the PowerShell Gallery

Linux & macOS

❗ If you are unable to install .NET Core, you must set ShowCoverPageImage to False in the report JSON configuration file.

πŸ” Required Privileges

A VMware vSphere As Built Report can be generated with read-only privileges, however the following sections will be skipped;

  • vSphere licensing information
  • VM Storage Policy information
  • VMware Update Manager / Lifecycle Manager information

For a complete report, the following role assigned privileges are required;

  • Global > Licenses
  • Global > Settings
  • Host > Configuration > Change Settings
  • Profile-driven Storage > Profile-driven storage view
  • VMware vSphere Update Manager > View Compliance Status

πŸ“¦ Module Installation

Open a PowerShell terminal window and install each of the required modules.

⚠️ VMware PowerCLI 12.3 or higher is required. Please ensure older PowerCLI versions have been uninstalled.

install-module VMware.PowerCLI -MinimumVersion 12.3 -AllowClobber
install-module AsBuiltReport.VMware.vSphere

✏️ Configuration

The vSphere As Built Report utilises a JSON file to allow configuration of report information, options, detail and healthchecks.

A vSphere report configuration file can be generated by executing the following command;

New-AsBuiltReportConfig -Report VMware.vSphere -FolderPath <User specified folder> -Filename <Optional>

Executing this command will copy the default vSphere 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.

Report

The Report schema provides configuration of the vSphere report information.

Sub-Schema Setting Default Description
Name User defined VMware vSphere 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
ShowTableOfContents true / false true Toggle to enable/disable table of contents
ShowHeaderFooter true / false true Toggle to enable/disable document headers & footers
ShowTableCaptions true / false true Toggle to enable/disable table captions/numbering

Options

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 vSphere 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

InfoLevel

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
vCenter 3 5
Cluster 3 4
ResourcePool 3 4
VMHost 3 5
Network 3 4
vSAN 3 4
Datastore 3 4
DSCluster 3 4
VM 2 4
VUM 3 5

Healthcheck

The Healthcheck schema is used to toggle health checks on or off.

vCenter

The vCenter schema is used to configure health checks for vCenter Server.

Sub-Schema Setting Default Description Highlight
Mail true / false true Highlights mail settings which are not configured Critical Not Configured
Licensing true / false true Highlights product evaluation licenses Warning Product evaluation license in use
Alarms true / false true Highlights vCenter Server alarms which are disabled Warning Alarm disabled

Cluster

The Cluster schema is used to configure health checks for vSphere Clusters.

Sub-Schema Setting Default Description Highlight
HAEnabled true / false true Highlights vSphere Clusters which do not have vSphere HA enabled Warning vSphere HA disabled
HAAdmissionControl true / false true Highlights vSphere Clusters which do not have vSphere HA Admission Control enabled Warning vSphere HA Admission Control disabled
HostFailureResponse true / false true Highlights vSphere Clusters which have vSphere HA Failure Response set to disabled Warning vSphere HA Host Failure Response disabled
HostMonitoring true / false true Highlights vSphere Clusters which do not have vSphere HA Host Monitoring enabled Warning vSphere HA Host Monitoring disabled
DatastoreOnPDL true / false true Highlights vSphere Clusters which do not have Datastore on PDL enabled Warning vSphere HA Datastore on PDL disabled
DatastoreOnAPD true / false true Highlights vSphere Clusters which do not have Datastore on APD enabled Warning vSphere HA Datastore on APD disabled
APDTimeOut true / false true Highlights vSphere Clusters which do not have APDTimeOut enabled Warning APDTimeOut disabled
vmMonitoing true / false true Highlights vSphere Clusters which do not have VM Monitoting enabled Warning VM Monitoring disabled
DRSEnabled true / false true Highlights vSphere Clusters which do not have vSphere DRS enabled Warning vSphere DRS disabled
DRSAutomationLevelFullyAuto true / false true Checks the vSphere DRS Automation Level is set to 'Fully Automated' Warning vSphere DRS Automation Level not set to 'Fully Automated'
PredictiveDRS true / false false Highlights vSphere Clusters which do not have Predictive DRS enabled Warning Predictive DRS disabled
DRSVMHostRules true / false true Highlights DRS VMHost rules which are disabled Warning DRS VMHost rule disabled
DRSRules true / false true Highlights DRS rules which are disabled Warning DRS rule disabled
vSANEnabled true / false true Highlights vSphere Clusters which do not have Virtual SAN enabled Warning Virtual SAN disabled
EVCEnabled true / false true Highlights vSphere Clusters which do not have Enhanced vMotion Compatibility (EVC) enabled Warning vSphere EVC disabled
VUMCompliance true / false true Highlights vSphere Clusters which do not comply with VMware Update Manager baselines Warning Unknown
Critical Not Compliant

VMHost

The VMHost schema is used to configure health checks for VMHosts.

Sub-Schema Setting Default Description Highlight
ConnectionState true / false true Highlights VMHosts which are in maintenance mode or disconnected Warning Maintenance
Critical Disconnected
HyperThreading true / false true Highlights VMHosts which have HyperThreading disabled Warning HyperThreading disabled
ScratchLocation true / false true Highlights VMHosts which are configured with the default scratch location Warning Scratch location is /tmp/scratch
IPv6 true / false true Highlights VMHosts which do not have IPv6 enabled Warning IPv6 disabled
UpTimeDays true / false true Highlights VMHosts with uptime days greater than 9 months Warning 9 - 12 months
Critical >12 months
Licensing true / false true Highlights VMHosts which are using production evaluation licenses Warning Product evaluation license in use
SSH true / false true Highlights if the SSH service is enabled Warning TSM / TSM-SSH service enabled
ESXiShell true / false true Highlights if the ESXi Shell service is enabled Warning TSM / TSM-EsxiShell service enabled
NTP true / false true Highlights if the NTP service has stopped or is disabled on a VMHost Critical NTP service stopped / disabled
StorageAdapter true / false true Highlights storage adapters which are not 'Online' Warning Storage adapter status is 'Unknown'
Critical Storage adapter status is 'Offline'
NetworkAdapter true / false true Highlights physical network adapters which are not 'Connected'
Highlights physical network adapters which are 'Down'
Critical Network adapter is 'Disconnected'
Critical Network adapter is 'Down'
LockdownMode true / false true Highlights VMHosts which do not have Lockdown mode enabled Warning Lockdown Mode disabled
VUMCompliance true / false true Highlights VMHosts which are not compliant with VMware Update Manager software packages Warning Unknown
Critical Incompatible

vSAN

The vSAN schema is used to configure health checks for vSAN.

Schema Sub-Schema Setting Default Description Highlight

Datastore

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% Warning 75 - 90% utilized
Critical >90% utilized

DSCluster

The DSCluster schema is used to configure health checks for Datastore Clusters.

Sub-Schema Setting Default Description Highlight
CapacityUtilization true / false true Highlights datastore clusters with storage capacity utilization over 75% Warning 75 - 90% utilized
Critical >90% utilized
SDRSAutomationLevelFullyAuto true / false true Highlights if the Datastore Cluster SDRS Automation Level is not set to 'Fully Automated' Warning Storage DRS Automation Level not set to 'Fully Automated'

VM

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 Warning VM is powered off
ConnectionState true / false true Highlights VMs which are orphaned or inaccessible Critical VM is orphaned or inaccessible
CpuHotAdd true / false true Highlights virtual machines which have CPU Hot Add enabled Warning CPU Hot Add enabled
CpuHotRemove true / false true Highlights virtual machines which have CPU Hot Remove enabled Warning CPU Hot Remove enabled
MemoryHotAdd true / false true Highlights VMs which have Memory Hot Add enabled Warning Memory Hot Add enabled
ChangeBlockTracking true / false true Highlights VMs which do not have Change Block Tracking enabled Warning Change Block Tracking disabled
SpbmPolicyCompliance true / false true Highlights VMs which do not comply with storage based policies Warning VM storage based policy compliance is unknown
Critical 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 Warning VM Tools not installed, out of date or not running
VMSnapshots true / false true Highlights Virtual Machines which have snapshots older than 7 days Warning VM Snapshot age >= 7 days
Critical VM Snapshot age >= 14 days

πŸ’» Examples

# Generate a vSphere As Built Report for vCenter Server 'vcenter-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:\Users\Tim\Documents'
PS C:\> New-AsBuiltReport -Report VMware.vSphere -Target 'vcenter-01.corp.local' -Username '[email protected]' -Password 'VMware1!' -Format Html,Word -OutputFolderPath 'C:\Users\Tim\Documents' -Timestamp

# Generate a vSphere As Built Report for vCenter Server 'vcenter-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:\Users\Tim\Documents'. Display verbose messages to the console.
PS C:\> New-AsBuiltReport -Report VMware.vSphere -Target 'vcenter-01.corp.local' -Username '[email protected]' -Password 'VMware1!' -Format Text,Html,Word -OutputFolderPath 'C:\Users\Tim\Documents' -ReportConfigFilePath 'C:\Users\Tim\AsBuiltReport\AsBuiltReport.VMware.vSphere.json' -Verbose

# Generate a vSphere As Built Report for vCenter Server 'vcenter-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:\Users\Tim\Documents'.
PS C:\> $Creds = Get-Credential
PS C:\> New-AsBuiltReport -Report VMware.vSphere -Target 'vcenter-01.corp.local' -Credential $Creds -Format Html,Text -OutputFolderPath 'C:\Users\Tim\Documents' -EnableHealthCheck

# Generate a single vSphere As Built Report for vCenter Servers 'vcenter-01.corp.local' and 'vcenter-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.vSphere -Target 'vcenter-01.corp.local','vcenter-02.corp.local' -Username '[email protected]' -Password 'VMware1!' -StyleFilePath 'C:\Scripts\Styles\MyCustomStyle.ps1'

# Generate a vSphere As Built Report for vCenter Server 'vcenter-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.vSphere -Target 'vcenter-01.corp.local' -Username '[email protected]' -Password 'VMware1!' -Format Html,Word -OutputFolderPath 'C:\Users\Tim\Documents' -SendEmail

More Repositories

1

AsBuiltReport.Microsoft.AD

Repository for AsBuiltReport Microsoft Active Directory module
PowerShell
63
star
2

AsBuiltReport.Core

Repository for AsBuiltReport core module
PowerShell
54
star
3

AsBuiltReport.Veeam.VBR

Repository for AsBuiltReport Veeam Backup & Replication module
PowerShell
51
star
4

AsBuiltReport.Fortinet.FortiGate

Repository for AsBuiltReport Fortinet FortiGate module
PowerShell
37
star
5

AsBuiltReport.VMware.ESXi

Repository for AsBuiltReport VMware ESXi module
PowerShell
36
star
6

AsBuiltReport.Microsoft.Windows

Repository for AsBuiltReport Microsoft Windows module
PowerShell
29
star
7

AsBuiltReport.DellEMC.VxRail

Repository for AsBuiltReport Dell EMC VxRail module
PowerShell
17
star
8

AsBuiltReport.VMware.Horizon

Repository for AsBuiltReport VMware Horizon module
PowerShell
16
star
9

AsBuiltReport.NetApp.ONTAP

A PowerShell module to generate an as built report on the configuration of NetApp ONTAP storage arrays.
PowerShell
15
star
10

AsBuiltReport.Rubrik.CDM

Repository for AsBuiltReport Rubrik CDM module
PowerShell
11
star
11

AsBuiltReport.Microsoft.Azure

Repository for AsBuiltReport Microsoft Azure module
PowerShell
11
star
12

AsBuiltReport.PureStorage.FlashArray

PowerShell
9
star
13

AsBuiltReport.Veeam.VB365

Repository for AsBuiltReport Veeam Backup for Microsoft 365 module
PowerShell
9
star
14

AsBuiltReport.Microsoft.DHCP

Repository for AsBuiltReport Microsoft DHCP module
PowerShell
8
star
15

AsBuiltReport.VMware.AppVolumes

PowerShell
7
star
16

AsBuiltReport.VMware.NSX-T

Repository for VMware NSX-T As Built Report
PowerShell
7
star
17

AsBuiltReport.Cisco.UcsManager

Repository for AsBuiltReport Cisco UCS Manager module
PowerShell
7
star
18

AsBuiltReport.HPE.iLO

AsBuiltReport repository for HPE iLO
6
star
19

AsBuiltReport.Nutanix.PrismElement

Repository for AsBuiltReport Nutanix Prism Element module
PowerShell
6
star
20

AsBuiltReport.VMware.NSXv

As Built Report for NSX-V
PowerShell
5
star
21

AsBuiltReport.VMware.UAG

PowerShell
4
star
22

AsBuiltReport.VMware.vROps

Repository for VMware vRealize Operations
PowerShell
4
star
23

AsBuiltReport.VMware.CloudFoundation

Repository for AsBuiltReport VMware Cloud Foundation module
PowerShell
4
star
24

AsBuiltReport.Microsoft.Intune

Repository for AsBuiltReport Microsoft Intune module
PowerShell
4
star
25

AsBuiltReport.github.io

HTML
2
star
26

AsBuiltReport.Aruba.ClearPass

Repository for AsBuiltReport Aruba ClearPass module
PowerShell
2
star
27

AsBuiltReport.Microsoft.Teams

Repository for AsBuiltReport Microsoft Teams module
PowerShell
2
star
28

AsBuiltReport.VMware.SRM

Repository for VMware Site Recovery Manager As Built Report
PowerShell
2
star
29

AsBuiltReport.VMware.vRA

Repository for VMware vRealize Automation
1
star
30

AsBuiltReport.DellEMC.PowerStore

Repository for AsBuiltReport Dell EMC PowerStore module
PowerShell
1
star
31

AsBuiltReport.AudioCodes.Mediant

Repository for AsBuiltReport AudioCodes Mediant module
PowerShell
1
star
32

AsBuiltReport.Microsoft.SCVMM

PowerShell
1
star
33

AsBuiltReport.VMware.WorkspaceOneAccess

PowerShell
1
star
34

AsBuiltReport.VMware.HorizonCloud

PowerShell
1
star
35

AsBuiltReport.VMware.WorkspaceOneUEM

PowerShell
1
star