Below are the instructions on how to install, configure and generate a VMware vSphere As Built report.
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
Open a Windows PowerShell terminal window and install each of the required modules as follows;
PS C:\> install-module PScribo
PS C:\> install-module VMware.PowerCLI
The vSphere As Built report utilises a JSON file (vSphere.json) to allow configuration of report information, features and section detail. All report settings are configured via the JSON file.
Modification of the PowerShell script (vSphere.ps1) is not required or recommended.
The following provides information of how to configure each schema within the report's JSON file.
The Report sub-schema provides configuration of the vSphere report information
Schema | Sub-Schema | Description |
---|---|---|
Report | Name | The name of the As Built report |
Report | Version | The document version |
Report | Status | The document release status |
The Options sub-schema allows certain options within the report to be toggled on or off
Schema | Sub-Schema | Setting | Description |
---|---|---|---|
Options | ShowLicenses | true / false | Toggle to mask/unmask vSphere license keys within the As Built report. Masked License Key *****-*****-*****-56YDM-AS12K Unmasked License Key AKLU4-PFG8M-W2D8J-56YDM-AS12K |
The InfoLevel sub-schema allows configuration of each section of the report at a granular level. The following sections can be set
Schema | Sub-Schema | Default Setting |
---|---|---|
InfoLevel | vCenter | 3 |
InfoLevel | ResourcePool | 3 |
InfoLevel | Cluster | 3 |
InfoLevel | VMhost | 3 |
InfoLevel | Network | 3 |
InfoLevel | vSAN | 3 |
InfoLevel | Datastore | 3 |
InfoLevel | DSCluster | 3 |
InfoLevel | VM | 3 |
InfoLevel | VUM | 3 |
InfoLevel | NSX* | 0 |
InfoLevel | SRM** | 0 |
* Requires PowerShell module PowerNSX to be installed
** Placeholder for future release
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 | Summary | provides summarised information for a collection of objects |
2 | Informative | 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 Healthcheck sub-schema is used to toggle health checks on or off.
The vCenter sub-schema is used to configure health checks for vCenter Server.
The Cluster sub-schema is used to configure health checks for vSphere Clusters.
The VMHost sub-schema is used to configure health checks for VMHosts.
The vSAN sub-schema is used to configure health checks for vSAN.
Schema | Sub-Schema | Setting | Description | Highlight |
---|---|---|---|---|
vSAN | CapacityUtilization | true / false | Highlights vSAN datastores with storage capacity utilization over 75% | 75 - 90% utilized >90% utilized |
The Datastore sub-schema is used to configure health checks for Datastores.
Schema | Sub-Schema | Setting | Description | Highlight |
---|---|---|---|---|
Datastore | CapacityUtilization | true / false | Highlights datastores with storage capacity utilization over 75% | 75 - 90% utilized >90% utilized |
The DSCluster sub-schema is used to configure health checks for Datastore Clusters.
The VM sub-schema is used to configure health checks for virtual machines.
Sample vSphere As Built report with health checks, using default report style.
Sample vSphere As Built report with health checks, using custom report style.
- Added new VM health checks for CPU Hot Add/Remove, Memory Hot Add & Change Block Tracking
- Improvements to VM reporting for Guest OS, CPU Hot Add/Remove, Memory Hot Add & Change Block Tracking
- Minor updates to section paragraph text
- Added SDRS VM Overrides to Datastore Cluster section
- SCSI LUN section rewritten to improve script performance
- Fixed issues with current working directory paths
- Changes to InfoLevel settings and definitions
- Script formatting improvements to some sections to align with PowerShell best practice guidelines
- vCenter Server SSL Certificate section removed temporarily
- Added regions/endregions to all sections of script
- Added Resource Pool summary information
- Added vSAN summary information
- Added vCenter Server mail settings health check
- Added DSCluster health checks
- Added VM Power State health check
- Added support for NSX-V reporting
- Requires PScribo module 0.7.24
- Formatting improvements
- Datastore Clusters now has it's own dedicated section
- Renamed Storage section to Datastores
- Renamed Storage health checks section to Datastore
-
Verbose script errors when connecting to vCenter with a Read-Only user account
-
In HTML documents, word-wrap of table cell contents is not working, causing the following issues;
- Cell contents may overflow table columns
- Tables may overflow page margin
- PScribo Issue #83
-
In Word documents, some tables are not sized proportionately. To prevent cell overflow issues in HTML documents, most tables are auto-sized, this causes some tables to be out of proportion.