Code Monkey home page Code Monkey logo

asbuiltreport.vmware.vsphere's Introduction

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 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
  • vSphere 6.5
  • vSphere 6.7

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

asbuiltreport.vmware.vsphere's People

Contributors

alagoutte avatar mattallford avatar orb71 avatar rebelinux avatar ryan-jan avatar tpcarman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asbuiltreport.vmware.vsphere's Issues

VMware vSphere reports may default to 'Times New Roman' font when using v1.0.6 release

Describe the bug
In v1.0.6 of the VMware vSphere as-built report, the report's default font was modified to Century Gothic font which would be a closer representation of the Metropolis font outlined in VMware's Clarity UX guidelines.
Century Gothic was assumed to be a system font, however it appears that this font is not available on all Windows Operating Systems, resulting in occurrences of the report defaulting to the Times New Roman font.

Workaround 1
Modify the font name in the default document style

  1. From a PowerShell console run get-module -ListAvailable -Name AsBuiltReport.VMware.vSphere | select modulebase to identify the install location of the AsBuiltReport VMware vSphere module
  2. Open the installation folder and edit AsBuiltReport.VMware.vSphere.Style.ps1
  3. Modify line 4, changing -DefaultFont to Arial or another installed font
  4. Save and exit the file
  5. Regenerate the VMware vSphere as-built report

Workaround 2
Specify a custom document style using the -StylePath parameter

Resolution
This issue will be resolved in a future update.

Script terminates when retrieving vCenter licensing information in some vSphere 6.0 environments

Describe the bug
When generating a VMware vSphere As Built Report against a vSphere 6.0 environment, the script terminates with the following error New-AsBuiltReport : You cannot call a method on a null-valued expression.

The issue has been isolated to the Get-License function when retrieving vCenter Server license information. It also appears that the problem is isolated to some vSphere 6.0 environments.

Expected behavior
VMware vSphere report should be generated without error and show valid vCenter Server licensing information.

System (please provide the following information about the system from which you are trying to generate a report):

  • Windows PowerShell version [Provide output from the following command: $PSVersionTable.PSVersion] 5.1.17763.316
  • 3rd party PowerShell module name and version [e.g. VMware PowerCLI 11.2] VMware.VimAutomation.Core 11.2.0.12483638
  • AsBuiltReport Core module version [e.g. 1.0.0] 1.0.0
  • AsBuiltReport Report module name and version [e.g. AsBuiltReport.VMware.vSphere 1.0.0] 1.0.0

Additional context
Add any other context about the problem here.

Add missing vCenter Server Advanced Settings for Certificates

Is your feature request related to a problem? Please describe.
I would like to see all of the 'certmgmt' settings in the vSphere report please.

Describe the solution you'd like
Amend the vCenter Server SSL Certificate region to include:

vpxd.certmgmt.mode
vpxd.certmgmt.certs.hardThreshold
vpxd.certmgmt.certs.minutesBefore
vpxd.certmgmt.certs.pollIntervalDays
vpxd.certmgmt.certs.softThreshold

#region vCenter Server SSL Certificate
Section -Style Heading3 'SSL Certificate' {
    $VcSslCertHash = @{
        Country          = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.cn.country'}).Value
        Email            = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.cn.email'}).Value
        Locality         = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.cn.localityName'}).Value
        State            = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.cn.state'}).Value
        Organization     = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.cn.organizationName'}).Value
        OrganizationUnit = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.cn.organizationalUnitName'}).Value
        DaysValid        = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.daysValid'}).Value
        Mode             = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.mode'}).Value
        HardThreshold    = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.hardThreshold'}).Value
        MinutesBefore    = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.minutesBefore'}).Value
        PollInterval     = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.pollIntervalDays'}).Value
        SoftThreshold    = ($VCAdvSettings | Where-Object {$_.name -eq 'vpxd.certmgmt.certs.softThreshold'}).Value
    }
        $VcSslCertificate = $VcSslCertHash | Select-Object @{L = 'Country'; E = {$_.Country}}, @{L = 'State'; E = {$_.State}}, @{L = 'Locality'; E = {$_.Locality}}, 
        @{L = 'Organization'; E = {$_.Organization}}, @{L = 'Organizational Unit'; E = {$_.OrganizationUnit}}, @{L = 'Email'; E = {$_.Email}}, @{L = 'Validity'; E = {"$($_.DaysValid / 365) Years"}},          
        @{L = 'Mode'; E = {$_.Mode}}, @{L = 'Hard Threshold'; E = {"$($_.HardThreshold) Days"}}, @{L = 'Soft Threshold'; E = {"$($_.SoftThreshold) Days"}}, 
        @{L = 'Poll Interval'; E = {"$($_.PollInterval) Days"}}, @{L = 'Minutes Before'; E = {$($_.MinutesBefore)}}
        $VcSslCertificate | Table -Name "$vCenter SSL Certificate" -List -ColumnWidths 50, 50
}
#endregion vCenter Server SSL Certificate

Describe alternatives you've considered
N/A

Additional context
image

You cannot call a method on a null-valued expression

Describe the bug
You cannot call a method on a null-valued expression error after getting to this section:
VERBOSE: [ 16:24:39:335 ] [ Document ] - Processing section 'DSC - Trusted Colours' completed.
VERBOSE: [ 16:24:39:350 ] [ Document ] - Processing section 'Datastore Clusters' completed.
VERBOSE: [ 16:24:39:350 ] [ Document ] - Processing section 'Virtual Machines' started.
VERBOSE: [ 16:24:39:366 ] [ Document ] - Processing paragraph 'The following sections detail the co[..]'.
VERBOSE: [ 16:24:39:366 ] [ Document ] - Processing blank line.
New-AsBuiltReport : You cannot call a method on a null-valued expression.
At line:1 char:1

  • New-AsBuiltReport -Report VMware.vSphere -Target 172.22.102.150 -User ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    
    
    
    
    

To Reproduce
Steps to reproduce the behavior:
New-AsBuiltReport -Report VMware.vSphere -Target 172.22.xxx.yyy -Username username -Password password OutputPath 'd:\Reports'

The licencing section is set to false in the json due to causing the report to fail.

Expected behavior
Report to be generated

Screenshots
VERBOSE: [ 16:24:39:335 ] [ Document ] - Processing section 'DSC - Trusted Colours' completed.
VERBOSE: [ 16:24:39:350 ] [ Document ] - Processing section 'Datastore Clusters' completed.
VERBOSE: [ 16:24:39:350 ] [ Document ] - Processing section 'Virtual Machines' started.
VERBOSE: [ 16:24:39:366 ] [ Document ] - Processing paragraph 'The following sections detail the co[..]'.
VERBOSE: [ 16:24:39:366 ] [ Document ] - Processing blank line.
New-AsBuiltReport : You cannot call a method on a null-valued expression.
At line:1 char:1

  • New-AsBuiltReport -Report VMware.vSphere -Target 172.22.xxx.yyy -User ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    
    

PS H:> $global:error[1]
You cannot call a method on a null-valued expression.
At C:\Program
Files\WindowsPowerShell\Modules\AsBuiltReport.VMware.vSphere\Src\Public\Invoke-AsBuiltReport.VMware.vSphere.ps1:3421
char:64

  • ... 'IP Address' = Switch ($VMView.Summary.Guest.IpAddress) {
  •                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

PS H:>

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: server 2016
  • Windows PowerShell version [Provide output from the following command: $PSVersionTable.PSVersion]

PS H:> $PSVersionTable.PSVersion

Major Minor Build Revision


5 1 14393 2969

AsBuiltReport Core 1.0.0 AsBuiltReport.Core

AsBuiltReport Report module name and version 1.1.0 AsBuiltReport.VMware.vSphere0.0]

vSphere 8.0 U1c Build 22088981 - New-AsBuiltReport : Cannot bind argument to parameter 'Rows' because it is an empty collection.

Describe the bug
vSphere 8.0 U1c Build 22088981 - New-AsBuiltReport : Cannot bind argument to parameter 'Rows' because it is an empty collection.

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade VCSA to 8.0 U1c
  2. Run AsBuiltReport

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Test with Windows 10 & Windows 11
  • Windows PowerShell version 5.1.22621.1778
  • 3rd party PowerShell module name and version 13.1.0.21624340
  • AsBuiltReport Core module version 1.3.0
  • AsBuiltReport Report module name and version 1.3.3.1

Cannot bind argument to parameter 'Rows' because it is an empty collection.

Report works fine on one 6.5 vcenter, but not the 6.5 or other 6.7's
To Reproduce
Steps to reproduce the behavior:
New-AsBuiltReport -Report VMware.vSphere -Target 123.456.789 -Username vcheck -Password password -Format HTML,Word -OutputPath 'd:\Reports'

Expected behavior
Report should run with no errors.

Screenshots
VERBOSE: [ 14:13:43:903 ] [ Document ] - Processing section 'Historical Statistics' completed.
VERBOSE: [ 14:13:43:903 ] [ Document ] - Processing section 'Licensing' started.
VERBOSE: [ 14:13:43:950 ] [ Document ] - Processing table 'Licensing'.
New-AsBuiltReport : Cannot bind argument to parameter 'Rows' because it is an empty collection.
At line:1 char:1

  • New-AsBuiltReport -Report VMware.vSphere -Target 123.456.789 -Usern ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    
    

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: server 2016
  • Windows PowerShell version [Provide output from the following command: PS H:> $PSVersionTable.PSVersion

Major Minor Build Revision


5 1 14393 2969

  • 3rd party PowerShell module name and version -VMware.VimAutomation.Core 10.0.0.7893909
  • AsBuiltReport Core module version 1.0.3
  • AsBuiltReport Report module name and version AsBuiltReport.VMware.vSphere 1.0.7

Additional context
Had this issue on previous builds, thought Id try again on latest build but seem to have hit the same licence row isssue

Get-DRSClusterGroup CMDLet

Hi Chaps,

I have followed the installation instructions but appear to missing a CMDLet

image

Windows 2016 Std
Powershell Version: 5.1.14393.3053
VMware PowerCLI Version: 6.5 Release 1 build 4624819

image

Hope you can help.

Cheers
Scott

New-AsBuiltReport : Exception calling "IsNullOrEmpty" with "1" argument(s): "Server vsphere.local\[email protected]:443 is not connected."

Describe the bug
When running the vSphere As Built Report against some environments (not all), the script seems to run OK, but right at the end where the document should be generated, the script exits with the following error:

At line:14 char:1
+ New-AsBuiltReport @props
+ ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport

I have narrowed this down and it only occurs if the vCenter Server level is set to 3 or higher, and the specific section of code that is causing the problem is related to vSphere Tag Assignments:

$TagAssignments = Get-TagAssignment -Server $vCenter
if ($TagAssignments) {
    Section -Style Heading3 'Tag Assignments' {
        $TagAssignments | Sort-Object Tag, Entity | Table -Name 'Tag Assignments' -Columns Tag, Entity -ColumnWidths 50, 50
    }
}
#endregion vCenter Server Tag Assignments

If the above section of code is removed or commented, the script will run with no issues at all.

In the environment I am running this against currently, there are two vCenter Servers running the same build (detailed below), but the script runs fine against one vCenter Server yet not the other.

In the problematic vSphere environment there are 138 tag assignments, in the environment that works OK there are 682 tag assignments.

To Reproduce
It doesn't seem to be clear on how to reproduce this issue at the moment. As described above I am running this in en environment that has two vCenter servers that, for the most part, seem to be based on the same build and are both using tag assignments, but the one with more tag assignments is OK and the one with fewer tag assignments is not ok.

Regardless, the steps to reproduce the behavior are:

  1. Ensure the Infolevel for vCenter is 3 or higher in the JSON being used for the vSphere Report
  2. Run New-AsBuiltReport specifying the VMware.vSphere Report type and the JSON containing a vCenter Infolevel of 3 or higher
  3. Observe an error when PScribo attempts to export the information to the desired document

The exact command being run (vCenter name obfuscated) is:

$props = @{
    Report = "VMware.vSphere"
    Target = "vcenter.domain.com"
    Username = '[email protected]'
    Password = 'SuperAwesomePassword'
    Format = "html","word"
    OutputPath = 'E:\vSphere 6.7 U3 Upgrade\Asbuilt'
    StylePath = 'E:\vSphere 6.7 U3 Upgrade\Asbuilt\Parallo.ps1'
    Timestamp = $true
    ReportConfigPath = 'E:\vSphere 6.7 U3 Upgrade\Asbuilt\AsBuiltReport.VMware.vSphere.json'
    AsBuiltConfigPath = 'E:\vSphere 6.7 U3 Upgrade\Asbuilt\AsBuiltReport.json'
}
New-AsBuiltReport @props

Expected behavior
The document should be produced with no errors.

Screenshots
If applicable, add screenshots to help explain your problem.

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Windows Server 2012 R2
  • Windows PowerShell version 5.1 build 14409 revision 1018
  • 3rd party PowerShell module name and version VMware PowerCLI 11.5.0.14912921
  • AsBuiltReport Core module version 1.0.3
  • AsBuiltReport Report module name and version 1.1.3 and 1.1.4

Additional context
If you dig in to some of the debugging in VS Code, the specific PScribo command it is failing on is Get-HtmlTable:

GetHtmlTable : Exception calling "IsNullOrEmpty" with "1" argument(s): "Server vsphere.local\[email protected]:443 is not connected."
At line:710 char:57
+ ...     [ref] $null = $tableBuilder.Append((GetHtmlTable -Table $Table));
+                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [GetHtmlTable], MethodInvocationException
    + FullyQualifiedErrorId : ViServerConnectionException,GetHtmlTable

image

The report runs ok if you output to text instead of word or HTML.

Host physical adapters section only shows vSwitch info, not distributed switch

Describe the bug
In the section for host physical adapters, the report currently only shows the name of a virtual standard switch (vSwitch) that a vmnic is associated with. If the vmnic is associated with a distributed switch, it is not shown here.

To Reproduce
Steps to reproduce the behavior:

  1. Run the report in an environment where hosts are connected to a distributed switch
  2. Review the "Physical Adapters" section of the report and observe the 'vSwitch' column is empty

Expected behavior
This table should list the name of the switch the vmnic is associated with whether is be a standard or distributed switch.

Screenshots
image

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Windows 10
  • Windows PowerShell version: 5.1
  • 3rd party PowerShell module name and version: VMware PowerCLI 11.2
  • AsBuiltReport Core module version: 1.0.0
  • AsBuiltReport Report module name and version: AsBuiltReport.VMware.vSphere 1.0.0

Problem with start or create the Reportconfig

Describe the bug

Running the command
New-AsBuiltReport -Report VMware.vSphere -Target vCenterFQDN -Credential (Get-Credential) -Format HTML,Word -OutputPath 'C:\Master\VMware\AsBuiltReport\Reports' -TimeStamp -EnableHealthcheck

Expected behavior
Not running in a Error or smooth go trough

Screenshots
image

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: [e.g. Windows 10]
    Windows 10 Enterprise
  • Windows PowerShell version [Provide output from the following command: $PSVersionTable.PSVersion]
    Major Minor Build Revision
    5 1 16299 1146
  • 3rd party PowerShell module name and version [e.g. VMware PowerCLI 11.2]
    VMware PowerCLI 6.5.0R1
  • AsBuiltReport Core module version [e.g. 1.0.0]
    1.0.2
  • AsBuiltReport Report module name and version [e.g. AsBuiltReport.VMware.vSphere 1.0.0]
    1.0.7

Additional context

Script Terminates at 'Rows' because it is an empty collection...

Sirs,

I'm new to AsBuilt. Installed module for vsphere. I'm running esxi 6.5 and powershell version 5.1. Each time I attempt to run one of the example reports it stops at the same point. See error below. What am I missing?

New-AsBuiltReport : Cannot bind argument to parameter 'Rows' because it is an empty collection.
At line:1 char:1

  • New-AsBuiltReport -Target 'vcenterserver' -Username 'administ ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    

Cannot validate argument on parameter 'Name' ...

Hello, receiving a "Cannot validate argument" error when running New-AsBuiltReport command. This is only happening when I try to use the -ReportConfigPath and -AsBuiltConfigPath parameters. If I don't include these parameters the report is generated correctly.

The path and files specified by -ReportConfigPath and -AsBuiltConfigPath are correct and the json files were actually generated by running the command and saving the files during the prompts.

Command: New-AsBuiltReport -Target vcentername -Credential $mycred -Report VMware.vSphere -Format Html,Word -ReportConfigPath 'C:\Scripts\Config\AsBuiltReport.json' -AsBuiltConfigPath 'C:\Scripts\Config\AsBuiltReport.VMware.vSphere.json' -OutputPath 'C:\Scripts\Output\ASBuilt' -Timestamp

Error: Cannot validate argument on parameter 'Name'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At line:1 char:1

Expected behavior
I expected the command to accept the input for the parameters as configuration and run the report.

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Windows 7 Professional
  • PSVersion 5.1.14409.1018
  • VMware PowerCLI 10.1.0.8403314
  • AsBuiltReport Core 1.0.1
  • AsBuiltReport.VMware.vSphere 1.0.7

New-AsBuiltReport : Cannot convert value "N/A" to type "System.Int32". Error: "Input string was not in a correct

Describe the bug
A clear and concise description of what the bug is.
VERBOSE: [ 19:59:33:522 ] [ Document ] - Processing section 'Hardware' started.
VERBOSE: [ 19:59:33:538 ] [ Document ] - Processing paragraph 'The following section details the ho[..]'.
VERBOSE: [ 19:59:33:538 ] [ Document ] - Processing blank line.
VERBOSE: [ 19:59:34:572 ] [ Document ] - Processing table 'xxxx ESXi Host Detailed
Information'.
VERBOSE: [ 19:59:34:603 ] [ Document ] - Processing section 'Boot Device' started.
New-AsBuiltReport : Cannot convert value "N/A" to type "System.Int32". Error: "Input string was not in a correct
format."
At line:1 char:1

  • New-AsBuiltReport -Report VMware.vSphere -Target xxxx -User ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    
    
    

The latest version 1.1.3. (AsBuiltReport) and latest PowerCLI version.
Boot Device from the server "None" --> Stateless Auto Deploay

IP address Report

New Feature Request:
It would be really useful to have an IP address Report as part of the export. This would allow for easy input into a IPAM, spread sheet, DB, etc. The idea would be to have this in a list of individual IPs. So each IP address would be on a line/row of its own.
Maybe the columns would be something like below.
IP(v4/v6),VMName,vNIC,VLAN#,Port-GroupName,vSwitch/dvSwitch,Host,Cluster,Location

Host count is incorrect on VDS switches in vSphere 6.0 environment

Host count on distributed virtual switches reports as zero in vSphere 6.0

To Reproduce
Steps to reproduce the behavior:

  1. Run VMware vSphere As Built report against a vSphere 6.0 environment with distributed virtual switches

Expected behavior
Distributed virtual switches should show the correct number of connected ESXi hosts

You cannot call a method on a null-valued expression: If Cluster-InfoLevel -gt 2

Hi,

if i set my Cluster Info Level on a VCSA 7 running on pwsh 7.12 to higher then 2 i get this:
New-AsBuiltReport: You cannot call a method on a null-valued expression.
(After a Cluster Verbose-Line Like '... AdmissionControl ...', sry i did not captured it on my tests)

The vCenter (VCSA) has 'empty' Clusters configured (without Hosts), probably this is the reason i thought....

Best Regards

Include Summary InfoLevel 1 information

Is your feature request related to a problem? Please describe.
Currently the VMware vSphere as built report lacks summarised information for each section.

Describe the solution you'd like
Add additional code which aligns to InfoLevel 1 to provide summary information for each section

Script terminates when generating a report against a vSphere 6.0 environment

Describe the bug
When generating a report for a VMware vSphere 6.0 environment, the script terminates when collecting information about the VMHosts.
Other errors are observed with ESXCLI and VUM

To Reproduce
Steps to reproduce the behavior:

  1. Run report against a vSphere 6.0 environment
  2. See error

Expected behavior
A vSphere report should be generated without any reported errors

The variable '$pscriboDocument' cannot be retrieved because it has not been set.

Getting an error when running this command
[SP]> Invoke-AsBuiltReport.VMware.vSphere -Target xxxxxxxxxx -Credential xxxxxxxxxxxxxxx
The variable '$pscriboDocument' cannot be retrieved because it has not been set.
At line:51 char:9

  •     $pscriboDocument.Properties['Sections']++;
    
  •     ~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (pscriboDocument:String) [], RuntimeException
    • FullyQualifiedErrorId : VariableIsUndefined

Id :
Level : 0
Number :
Name :
Type : PScribo.Section
Style : Heading1
Tabs : 0
IsExcluded : False
Sections : {}
Orientation : Portrait
IsSectionBreak : False
IsSectionBreakEnd : False

InfoLevel greater than 2 for vCenter, VMHost, or VM produces errors

Setting InfoLevel greater than 2 for some classes produces fatal errors. Detail for each scenario in screenshots section below.

To Reproduce
Steps to reproduce the behavior:

  1. Set InfoLevel to 3 in AsBuiltReport.VMware.vSphere.json for vCenter, VMHost, or VM
  2. Run New-AsBuiltReport -Report VMware.vSphere [...]
  3. Wait
  4. See error

Expected behavior
Produce the required output files.

Screenshots

    "InfoLevel": {
        "_comment_": "0 = Disabled, 1 = Summary, 2 = Informative, 3 = Detailed, 4 = Adv Detailed, 5 = Comprehensive",
        "vCenter": 2,
        "Cluster": 3,
        "ResourcePool": 3,
        "VMHost": 2,
        "Network": 3,
        "vSAN": 0,
        "Datastore": 3,
        "DSCluster": 3,
        "VM": 2,
        "VUM": 3
    },

This completes as expected and produces HTML and Text output defined with -Format HTML,Text parameters.

Setting vCenter to InfoLevel 3:

PS C:\PS-scripts> C:\PS-scripts\Reporting\vCenter\AsBuiltReports\New-Asbuilt_Report-DC1.ps1
New-AsBuiltReport : You cannot call a method on a null-valued expression.
At C:\PS-scripts\Reporting\vCenter\AsBuiltReports\New-Asbuilt_Report-DC1.ps1:4 char:1
+ New-AsBuiltReport -Report VMware.vSphere -Target $creds.Host -Timesta ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport


Setting VMHost to InfoLevel 3:

PS C:\PS-scripts> C:\PS-scripts\Reporting\vCenter\AsBuiltReports\New-Asbuilt_Report-DC1.ps1
Get-VMHostHardware : 8/28/2020 9:28:24 AM       Get-VMHostHardware              Permission to perform this operation was denied.
At C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.VMware.vSphere\1.1.3\Src\Public\Invoke-AsBuiltReport.VMware.vSphere.ps1:1793 char:63
+ ...                  $VMHostHardware = Get-VMHostHardware -VMHost $VMHost
+                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-VMHostHardware], VimException
    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMHostHardware

New-AsBuiltReport : Permission to perform this operation was denied.
At C:\PS-scripts\Reporting\vCenter\AsBuiltReports\New-Asbuilt_Report-DC1.ps1:4 char:1
+ New-AsBuiltReport -Report VMware.vSphere -Target $creds.Host -Timesta ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport


Setting VM to InfoLevel 3:

PS C:\PS-scripts> C:\PS-scripts\Reporting\vCenter\AsBuiltReports\New-Asbuilt_Report-DC1.ps1
Get-SpbmEntityConfiguration : 8/28/2020 9:33:03 AM      Get-SpbmEntityConfiguration             Permission to perform this operation was denied. Required privilege 'StorageProfile.View' on managed object
with id 'Folder-group-d1'.
At C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.VMware.vSphere\1.1.3\Src\Public\Invoke-AsBuiltReport.VMware.vSphere.ps1:3639 char:49
+ ...        $VMSpbmConfig = Get-SpbmEntityConfiguration -VM ($VMs) | Where ...
+                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-SpbmEntityConfiguration], NoPermission
    + FullyQualifiedErrorId : Storage_SpbmProfileServiceImpl_GetAssociatedStoragePolicy_ViError,VMware.VimAutomation.Storage.Commands.Cmdlets.Spbm.GetSpbmEntityConfiguration

Hangs here until CTRL+C

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Windows 2019 Datacenter, 10.0.17763 Build 17763
  • Windows PowerShell version
PS C:\> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      17763  1007    
  • 3rd party PowerShell module name and version:
Version              Name                                Repository           Description
-------              ----                                ----------           -----------
1.0.5                AsBuiltReport                       PSGallery            A PowerShell module manifest which ins...
0.2.1                AsBuiltReport.Cisco.UcsManager      PSGallery            A PowerShell module to generate an as ...
1.0.5                AsBuiltReport.Core                  PSGallery            A PowerShell module which provides the...
1.1.0                AsBuiltReport.Nutanix.PrismElement  PSGallery            A PowerShell module to generate an as ...
0.4.1                AsBuiltReport.PureStorage.FlashA... PSGallery            A PowerShell module to generate an as ...
0.0.7                AsBuiltReport.Rubrik.CDM            PSGallery            A PowerShell module to generate an as ...
1.0.0                AsBuiltReport.VMware.ESXi           PSGallery            A PowerShell module to generate an as ...
0.4.1                AsBuiltReport.VMware.NSXv           PSGallery            A PowerShell module to generate as bui...
1.1.3                AsBuiltReport.VMware.vSphere        PSGallery            A PowerShell module to generate an as ...
3.0.0.10             Cisco.UCS.Common                    PSGallery            PowerShell Module for Cisco Core (Core...
2.5.3.0              Cisco.UCS.Core                      PSGallery            PowerShell Module for Cisco Core (Core...
3.0.0.10             Cisco.UCSManager                    PSGallery            PowerShell Module for Cisco UCS Manage...
1.4.7                PackageManagement                   PSGallery            PackageManagement (a.k.a. OneGet) is a...
2.2.4.1              PowerShellGet                       PSGallery            PowerShell module with commands for di...
0.9.1                PScribo                             PSGallery            PScribo documentation Powershell modul...
1.17.3.0             PureStoragePowerShellSDK            PSGallery            Pure Storage FlashArray REST API integ...
12.0.0.15947289      VMware.CloudServices                PSGallery            PowerCLI CloudServices sample module.
7.0.0.15902843       VMware.DeployAutomation             PSGallery            This Windows PowerShell module contain...
7.0.0.15902843       VMware.ImageBuilder                 PSGallery            This Windows PowerShell module contain...
12.0.0.15947286      VMware.PowerCLI                     PSGallery            This Windows PowerShell module contain...
7.0.0.15939650       VMware.Vim                          PSGallery            This Windows PowerShell module contain...
12.0.0.15939657      VMware.VimAutomation.Cis.Core       PSGallery            This Windows PowerShell module contain...
12.0.0.15940183      VMware.VimAutomation.Cloud          PSGallery            This Windows PowerShell module contain...
12.0.0.15939652      VMware.VimAutomation.Common         PSGallery            This Windows PowerShell module contain...
12.0.0.15939655      VMware.VimAutomation.Core           PSGallery            This Windows PowerShell module contain...
12.0.0.15939647      VMware.VimAutomation.Hcx            PSGallery            This Windows PowerShell module contain...
7.12.0.15718406      VMware.VimAutomation.HorizonView    PSGallery            This Windows PowerShell module contain...
12.0.0.15939670      VMware.VimAutomation.License        PSGallery            This Windows PowerShell module contain...
12.0.0.15939671      VMware.VimAutomation.Nsxt           PSGallery            This Windows PowerShell module contain...
12.0.0.15939651      VMware.VimAutomation.Sdk            PSGallery            This Windows PowerShell module contain...
12.0.0.15939672      VMware.VimAutomation.Security       PSGallery            This Windows PowerShell module contain...
11.5.0.14899557      VMware.VimAutomation.Srm            PSGallery            This Windows PowerShell module contain...
12.0.0.15939648      VMware.VimAutomation.Storage        PSGallery            This Windows PowerShell module contain...
1.3.0.0              VMware.VimAutomation.StorageUtility PSGallery            This Windows PowerShell module contain...
12.0.0.15940185      VMware.VimAutomation.Vds            PSGallery            This Windows PowerShell module contain...
12.0.0.15947287      VMware.VimAutomation.Vmc            PSGallery            This Windows PowerShell module contain...
12.0.0.15940184      VMware.VimAutomation.vROps          PSGallery            This Windows PowerShell module contain...
12.0.0.15947288      VMware.VimAutomation.WorkloadMan... PSGallery            PowerShell commands for automation of ...
6.5.1.7862888        VMware.VumAutomation                PSGallery            This Windows PowerShell module contain...

  • AsBuiltReport Core module version: 1.0.5
  • AsBuiltReport Report module name and version: AsBuiltReport.VMware.vSphere 1.0.0

Additional context
[email protected] was used for each New-AsBuiltReport to avoid any rights errors.

Additional iSCSI software storage adapter settings

Is your feature request related to a problem? Please describe.
I have a client requesting the report include specific settings related to the iSCSI software storage adapter. Additional settings I would like to add to the report on the iSCSI software storage adapter..

Authentication Method
Authentication Method Account Name
Advanced Options
Network Port Binding - (Port Group, vmk adapter, Port Group Policy, Path Status, Physical Network Adapter)
Targets - Dynamic Discovery (iSCSI server list)

Describe the solution you'd like
I would like to know how to amend the script to include the above.

Describe alternatives you've considered
No alternatives considered. Reviewed Invoke-AsBuiltReport.VMware.vSphere.ps1 but not sure how to alter code to get what I need.

Additional context
No other context.

Thanks for your assistance.

Script terminates at New-AsBuiltReport : A parameter cannot be found that matches parameter name 'Name'.

I have just freshly installed the required modules for this today, & here is the entry that gets this error.

New-AsBuiltReport -Target 'vcenterserver.tesi.local' -Credential $Creds -Report VMware.vSphere -Format Html,Text -OutputPath 'C:\Reports' -EnableHealthCheck

then gives me

New-AsBuiltReport : A parameter cannot be found that matches parameter name 'Name'.
At line:1 char:1

  • New-AsBuiltReport -Target 'vcenterserver.tesi.local' -Credential $Cre ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    

Exception calling "Substring" with "1" argument(s)

Just started with the AsBuiltReports. I have all prereq's installed but when I attempt to run the vSphere module, I receive an error:

VERBOSE: [ 09:01:00:029 ] [ Document ] - Setting global document options.
VERBOSE: [ 09:01:00:029 ] [ Document ] - Enabling section/heading numbering.
VERBOSE: [ 09:01:00:030 ] [ Document ] - Setting default font(s) to 'Arial'.
VERBOSE: [ 09:01:00:030 ] [ Document ] - Setting page top margin to '25.05'mm.
VERBOSE: [ 09:01:00:031 ] [ Document ] - Setting page right margin to '25.05'mm.
VERBOSE: [ 09:01:00:031 ] [ Document ] - Setting page bottom margin to '25.05'mm.
VERBOSE: [ 09:01:00:031 ] [ Document ] - Setting page left margin to '25.05'mm.
VERBOSE: [ 09:01:00:031 ] [ Document ] - Setting page size to 'A4'.
VERBOSE: [ 09:01:00:032 ] [ Document ] - Setting page orientation to 'Portrait'.
VERBOSE: [ 09:01:00:032 ] [ Document ] - Setting page height to '297'mm.
VERBOSE: [ 09:01:00:033 ] [ Document ] - Setting page width to '210'mm.
VERBOSE: [ 09:01:00:033 ] [ Document ] - Setting document style 'Title'.
VERBOSE: [ 09:01:00:034 ] [ Document ] - Setting document style 'Title2'.
VERBOSE: [ 09:01:00:034 ] [ Document ] - Setting document style 'Title3'.
VERBOSE: [ 09:01:00:035 ] [ Document ] - Setting document style 'Heading1'.
VERBOSE: [ 09:01:00:035 ] [ Document ] - Setting document style 'Heading2'.
VERBOSE: [ 09:01:00:036 ] [ Document ] - Setting document style 'Heading3'.
VERBOSE: [ 09:01:00:036 ] [ Document ] - Setting document style 'Heading4'.
VERBOSE: [ 09:01:00:037 ] [ Document ] - Setting document style 'Heading5'.
VERBOSE: [ 09:01:00:037 ] [ Document ] - Setting document style 'Normal'.
VERBOSE: [ 09:01:00:038 ] [ Document ] - Setting document style 'Caption'.
VERBOSE: [ 09:01:00:038 ] [ Document ] - Setting document style 'Header'.
VERBOSE: [ 09:01:00:039 ] [ Document ] - Setting document style 'Footer'.
VERBOSE: [ 09:01:00:039 ] [ Document ] - Setting document style 'TOC'.
VERBOSE: [ 09:01:00:040 ] [ Document ] - Setting document style 'TableDefaultHeading'.
VERBOSE: [ 09:01:00:041 ] [ Document ] - Setting document style 'TableDefaultRow'.
VERBOSE: [ 09:01:00:041 ] [ Document ] - Setting document style 'Critical'.
VERBOSE: [ 09:01:00:042 ] [ Document ] - Setting document style 'Warning'.
VERBOSE: [ 09:01:00:042 ] [ Document ] - Setting document style 'Info'.
VERBOSE: [ 09:01:00:043 ] [ Document ] - Setting document style 'OK'.
VERBOSE: [ 09:01:00:043 ] [ Document ] - Setting table style 'TableDefault'.
VERBOSE: [ 09:01:00:044 ] [ Document ] - Setting table style 'Borderless'.
VERBOSE: [ 09:01:00:045 ] [ Document ] - Processing document header started.
VERBOSE: [ 09:01:00:046 ] [ Document ] - Processing paragraph 'VMware vSphere As Built Report - v1.0'.
VERBOSE: [ 09:01:00:050 ] [ Document ] - Processing document header completed.
VERBOSE: [ 09:01:00:050 ] [ Document ] - Processing document footer started.
VERBOSE: [ 09:01:00:051 ] [ Document ] - Processing paragraph 'Page <!# PageNumber #!>'.
VERBOSE: [ 09:01:00:052 ] [ Document ] - Processing document footer completed.
VERBOSE: [ 09:01:00:052 ] [ Document ] - Processing blank line.
VERBOSE: [ 09:01:00:053 ] [ Document ] - Processing image 'VMware Logo'.
VERBOSE: [ 09:01:00:064 ] [ Document ] - Processing blank line.
VERBOSE: [ 09:01:00:065 ] [ Document ] - Processing paragraph 'VMware vSphere As Built Report'.
VERBOSE: [ 09:01:00:068 ] [ Document ] - Processing blank line.
VERBOSE: [ 09:01:00:069 ] [ Document ] - Processing table 'Cover Page'.
VERBOSE: [ 09:01:00:070 ] [ Document ] - Processing page break.
VERBOSE: [ 09:01:00:070 ] [ Document ] - Processing table of contents 'Table of Contents'.
VERBOSE: [ 09:01:00:070 ] [ Document ] - Processing page break.
VERBOSE: [ 09:01:00:097 ] [ Document ] - Connecting to vCenter Server 'vcenter'.
VERBOSE: [ 09:01:00:751 ] [ Document ] - Checking vCenter user privileges.
VERBOSE: [ 09:01:00:885 ] [ Document ] - Creating VM lookup hashtable.
VERBOSE: [ 09:01:02:406 ] [ Document ] - Creating VMHost lookup hashtable.
VERBOSE: [ 09:01:02:503 ] [ Document ] - Creating Datastore lookup hashtable.
VERBOSE: [ 09:01:02:542 ] [ Document ] - Creating VDPortGroup lookup hashtable.
VERBOSE: [ 09:01:02:579 ] [ Document ] - Creating EVC lookup hashtable.
VERBOSE: [ 09:01:02:743 ] [ Document ] - Checking for VMware Update Manager Server.
VERBOSE: [ 09:01:02:745 ] [ Document ] - Checking for VxRail Manager Server.
VERBOSE: [ 09:01:02:745 ] [ Document ] - Checking for VMware Site Recovery Manager Server.
VERBOSE: [ 09:01:02:746 ] [ Document ] - Checking for VMware NSX-T Manager Server.
VERBOSE: [ 09:01:05:097 ] [ Document ] - Collecting vcenter advanced settings.
VERBOSE: [ 09:01:05:197 ] [ Document ] - Processing section 'vcenter' started.
VERBOSE: [ 09:01:05:198 ] [ Document ] - vCenter InfoLevel set at 3.
VERBOSE: [ 09:01:05:198 ] [ Document ] - Processing section 'vCenter Server' started.
VERBOSE: [ 09:01:05:199 ] [ Document ] - Processing paragraph 'The following sections detail the co[..]'.
VERBOSE: [ 09:01:05:199 ] [ Document ] - Processing blank line.
New-AsBuiltReport: Exception calling "Substring" with "1" argument(s): "startIndex cannot be larger than length of string. (Parameter 'startIndex')"

I am unsure of what is supposed to run at this point, so not sure where to look for an error.

Thank you for any help!

Certificate Check points to wrong certificate

Describe the bug
In our environment we have Certificates Signed by our PKI in place but the report shows the default VMware certificate
2021-07-07 09_03_57

To Reproduce
Running a VMware vSphere as built report against a VMware.vSphere

vCenter InfoLevel is 3 or higher
Host InfoLevel is 2 or higher
Cluster InfoLevel is 3 or higher

Error when trying to use XML Output Reports

Describe the bug
XML Report Output allows XML tag names to start with a Number which is not allowed by standards and causes errors when trying to use or view it.

To Reproduce
Steps to reproduce the behavior:

  1. Create a VMware report using something like:
    New-AsBuiltReport -Target 'vcenter-01.corp.local','vcenter-02.corp.local' -Username 'An_Administrator' -Password 'Password' -Report VMware.vSphere -Format Html,XML -OutputPath 'C:\Users\Tim\Documents' -EnableHealthCheck

  2. When finished, open the XML report in another XML viewer or editor such as XML Editor, Excel, Visual Studio, etc...

  3. It will either fail to load or show errors when loaded. See screenshots below

Expected behavior
A usable XML file that can be imported or manipulated in other tools without errors.

Screenshots
image

image

System:

  • OS: Windows
  • Windows PowerShell version: 5.1
  • 3rd party PowerShell module name and version: VMware PowerCLI 11.4
  • AsBuiltReport Core module version: 1.0.3
  • AsBuiltReport Report module name and version: AsBuiltReport.VMware.vSphere 1.0.7

Suggestions:

A quick web search found a couple of ways to "fix" this:

  1. Prepend all of the XML "names" with something like an _ to make it valid - ex. <_8112c111-d06a-42e7-8bbd-0e70670a153b name="vcsa.qa.dmz">

  2. Haven't dug into your code to see if it is being used as anything other than a simple random tracker for the XML, but change it to use something else to create the random tag name or adjust the code so that it doesn't allow the random tag name to begin with number

  3. If still want to use the number, you can just encode the first char to use the hex equivalent no matter if it is alpha or numeric (ex x0038 to represent 8) as seen in this stackoverflow thread. This would make it harder to "look" at and since it is non-standard, it might cause additional issues or weirdness when other XML tools might not handle it properly as seen in this thread.

Obviously I think that option 1 would be the easiest and quickest fix, but since I haven't looked into the code, I don't know if it would cause other issues.

vCenter user privileges doesn't handle groups

Describe the bug
The As Built Report for vSphere is unable to determine privileges of user running the report if they receive privileges via a group (eg Active Directory group) rather than directly assigned.

To Reproduce
Steps to reproduce the behavior:

  1. Run the As Built Report against a vCenter
  2. Output includes messages such as "Insufficient user privileges to report vCenter Server licensing"

Expected behavior
As built report should be aware of privileges allocated via AD group.

Screenshots
If applicable, add screenshots to help explain your problem.

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Windows 2012R2
  • Windows PowerShell version 5.1
  • 3rd party PowerShell module name and version PowerCLI 12.4.1
  • AsBuiltReport Core module version 1.2.0
  • AsBuiltReport Report module name and version AsBuiltReport.VMware.vSphere 1.3.3.1

Additional context
Code in Invoke-AsBuiltReport.VMware.vSphere.ps1 beginning line 50 can be changed to instead check the effective user privileges rather than looking for directly assigned role.
For example, to get a list of the effective privileges at the top level in vCenter, you could use code like this. Then you can compare that list against the expected required privilege for a given piece of information (eg Global.Licenses for the ESXi licenses"

$AuthMgr = Get-View $($vCenter.ExtensionData.Content.AuthorizationManager)
$Privileges = $authMgr.FetchUserPrivilegeOnEntities("Folder-group-d1", $vCenter.User)

AsbuiltReport fails when scanning the HCX Cloud Gateway (CGW) dummy host

Describe the bug
The AsBuiltReport script fails to scan the hardware as well as trying to get to the ESXCLI of the HCX Dummy Host.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy HCX with the CGW
  2. You'll see a host appear in vCenter that has cpu, ram and storage but no VMs.
  3. Run Script

Expected behavior
Perhaps the script could recognize the HCX host and skip any further operations.

Screenshots
VERBOSE: [ 11:00:48:742 ] [ Document ] - Processing blank line.
Get-EsxCli : 5/7/2019 11:00:50 AM Get-EsxCli Object of type 'InternalVimApi_50.ManagedObjectReference' cannot be converted to type 'System.String'.
At C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.VMware.vSphere\1.0.0\Src\Public\Invoke-AsBuiltReport.VMware.vSphere.ps1:1602 char:55

  • ... $esxcli = Get-EsxCli -VMHost $VMHost -V2 -Server $vCenter
  •                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Get-EsxCli], VimException
    • FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.EsxCli.GetEsxCli

Get-VMHostHardware : 5/7/2019 11:00:51 AM Get-VMHostHardware The operation is not supported on the object.
At C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.VMware.vSphere\1.0.0\Src\Public\Invoke-AsBuiltReport.VMware.vSphere.ps1:1603 char:63

  • ... $VMHostHardware = Get-VMHostHardware -VMHost $VMHost
  •                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Get-VMHostHardware], VimException
    • FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMHostHardware

VERBOSE: [ 11:00:51:474 ] [ Document ] - Processing table '10.109.8.41 ESXi Host Detailed Information'.
VERBOSE: [ 11:00:51:548 ] [ Document ] - Processing section 'Boot Device' started.
Get-EsxCli : 5/7/2019 11:00:51 AM Get-EsxCli Object of type 'InternalVimApi_50.ManagedObjectReference' cannot be converted to type 'System.String'.
At C:\Program Files\WindowsPowerShell\Modules\AsBuiltReport.VMware.vSphere\1.0.0\Src\Public\Invoke-AsBuiltReport.VMware.vSphere.ps1:285 char:19

  •     $esxcli = Get-EsxCli -V2 -VMHost $vmhost -Server $vCenter
    
  •               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Get-EsxCli], VimException
    • FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.EsxCli.GetEsxCli

New-AsBuiltReport : You cannot call a method on a null-valued expression.
At line:1 char:1

  • New-AsBuiltReport -Report VMware.vSphere -Target m2-payl-vc01.gci.com ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    
    

PS C:\windows\system32>

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Windows 10
  • Powershell: 5.1.14393.2879
  • PowerCLI 11.2.0
  • Manifest 1.0.0 AsBuiltReport
  • Script 0.2.0 AsBuiltReport.Cisco.UcsManager Invoke-AsBuiltReport.Cisco.UcsManager
  • Script 1.0.0 AsBuiltReport.Core {New-AsBuiltReport, New-AsBuiltConfig, New-AsBuiltReportConfig}
  • Script 0.4.1 AsBuiltReport.PureStorage.FlashA... Invoke-AsBuiltReport.PureStorage.FlashArray
  • Script 0.4.1 AsBuiltReport.VMware.NSXv Invoke-AsBuiltReport.VMware.NSXv
  • Script 1.0.0 AsBuiltReport.VMware.vSphere Invoke-AsBuiltReport.VMware.vSphere

image
image

Asbuilt for vSphere errors stops running

Describe the bug
This is the error (I removed the servername)
New-AsBuiltReport : The variable '$Images' cannot be retrieved because it has not been set.
At line:1 char:1

  • New-AsBuiltReport -Report VMware.vSphere -Target 'XXXXXXX ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    

To Reproduce

Steps to reproduce the behavior:
Running New-AsBuiltReport against Vsphere

Expected behavior
I expected the report to be generated

Screenshots
If applicable, add screenshots to help explain your problem.

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Windows 2019
  • Windows PowerShell version [Provide output from the following command: $PSVersionTable.PSVersion]
  • Major Minor Build Revision

5 1 17763 3770

  • 3rd party PowerShell module name and version [e.g. VMware PowerCLI 11.2]
    VMware.PowerCLI 13.1.0 build 21624340

  • AsBuiltReport Core module version [e.g. 1.0.0]

1.3.0 AsBuiltReport.Core

  • AsBuiltReport Report module name and version [e.g. AsBuiltReport.VMware.vSphere 1.0.0]

1.3.3.1 AsBuiltReport.VMware.vSphere

Additional context
Add any other context about the problem here.

vSAN 8 ESA - "VsanDiskGroup" is empty

vSAN 8 ESA has no disk groups anymore. The argument is NULL or empty

Perhaps you can skip the vSAN disk group information in the script ?

Update:

Test with the RC run into the same error:

ModuleType Version Name ExportedCommands


Script 1.3.4 AsBuiltReport.VMware.vSphere Invoke-AsBuiltReport.VMware.vSphere

New-AsBuiltReport : The argument for the VsanDiskGroup parameter cannot be verified. The argument is NULL or empty. Provide an argument that is not NULL or empty, and
run the command again.
In line:1 character:1

  • New-AsBuiltReport -Report VMware.vSphere -Target myvc.local ...
 + CategoryInfo : NotSpecified: (:) [Write Error], WriteErrorException
 + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport

ESXi 8.0.2 Build 22380479
vCenter 8.0.2 Build 22385739

Name Value


PSVersion 5.1.19041.3693
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.3693
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

PowerCLI Version

VMware.PowerCLI 13.2.1 build 22851661

Component Versions

VMware Common PowerCLI Component 13.2 build 22643733
VMware Cis Core PowerCLI Component PowerCLI Component 13.2 build 22643734
VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 13.2 build 22643732
VMware VimAutomation Storage PowerCLI Component PowerCLI Component 13.2 build 22643728
VMware VimAutomation Vds Commands PowerCLI Component PowerCLI Component 13.1 build 21610933

Add PowerShell Core Support

When try to use AsBuiltReport on PowerShell Core, there is error about missing some VMware.PowerCLI cmdlets ( Get-VMHostHardware, Get-PatchBaseline, Get-Compliance)

it will be better to "skip" (and don't have an fatal error)
Now PScribo is compatible with PowerShell Core

**System

  • OS: Windows 10, Linux (Ubuntu), macOS
  • Windows PowerShell version 6.2.4

add diff of missing element if you "ignore" (See https://github.com/alagoutte/AsBuiltReport.VMware.vSphere/tree/Add-PowerShellCore-Support ) missing cmdlet

< 1.4.1.2.3          Update Manager Compliance
127d125
329,330d324
< 1.9             VMware Update Manager
< 1.9.1            Baselines
715c709
< Number of NICs          : 2
---
> Number of NICs          : Unknown
729c723
< Uptime Days             : 30,11
---
> Uptime Days             : 30,03
797,805d790
< 1.4.1.2.3 Update Manager Compliance
< ------------------------------------------------------------------------------------------------------------------------
<
< Baseline                                Status
< --------                                ------
< Critical Host Patches (Predefined)     Unknown
< Non-Critical Host Patches (Predefined) Unknown
<
<
1100,1101c1085,1086
< Serial Number           : CZ3502LSAT
< Asset Tag               :
---
> Serial Number           : Unknown
> Asset Tag               : Unknown
1110c1095
< Number of NICs          : 2
---
> Number of NICs          : Unknown
1185,1193d1169
< 1.4.2.2.3 Update Manager Compliance
< ------------------------------------------------------------------------------------------------------------------------
<
< Baseline                                Status
< --------                                ------
< Critical Host Patches (Predefined)     Unknown
< Non-Critical Host Patches (Predefined) Unknown
<
<
3638,3653d3595
<
<
< 1.9 VMware Update Manager
< ------------------------------------------------------------------------------------------------------------------------
< The following sections detail the configuration of VMware Update Manager managed by vCenter Server bdx-sr-vcsa.demovsan.
< intra.
<
< 1.9.1 Baselines
< ------------------------------------------------------------------------------------------------------------------------
<
< Baseline                                                  Description
< --------                                                  -----------
< Critical Host Patches (Predefined)                        A predefined baseline for all critical patches for Hosts
< ESX Agent Manager :: 0cf991bd-bc58-4935-9419-34433eaf5e9e Baseline for agency: 0cf991bd-bc58-4935-9419-34433eaf5e9e and
<                                                           software: [334, 335, 336]owned by ESX Agent Manager
< Non-Critical Host Patches (Predefined)                    A predefined baseline for all non-critical patches for Hosts

Unable to retrieve PCIe device information on some VMHosts

Describe the bug
Script terminates with the following error when trying to retrieve PCIe device information

New-AsBuiltReport : Message: EsxCLI.CLIFault.summary;
InnerText: There is no pnic with name vmnic2EsxCLI.CLIFault.summary
At line:1 char:1
+ New-AsBuiltReport -Report VMware.vSphere -Target vcenter.domain.local ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport

To Reproduce
When connecting to vCenter with PowerCLI and running the Get-PciDeviceDetail function manually, the following information and errors are displayed

VMkernel Name    : vmhba0
Device Name      : Smart Array P220i
Driver           : nhpsa
Driver Version   : 2.0.24-1OEM.650.0.0.4598673
Firmware Version : N/A
VIB Name         : nhpsa
VIB Version      : 2.0.24-1OEM.650.0.0.4598673

VMkernel Name    : vmnic0
Device Name      : QLogic 57810 10 Gigabit Ethernet Adapter
Driver           : bnx2x
Driver Version   : Version 2.713.30.v60.9, Build: 2494585, Interface: 9.2 Built on: Sep 20 2017
Firmware Version : bc 7.13.75
VIB Name         : net-bnx2x
VIB Version      : 2.713.30.v60.9-1OEM.600.0.0.2494585

VMkernel Name    : vmnic1
Device Name      : QLogic 57810 10 Gigabit Ethernet Adapter
Driver           : bnx2x
Driver Version   : Version 2.713.30.v60.9, Build: 2494585, Interface: 9.2 Built on: Sep 20 2017
Firmware Version : bc 7.13.75
VIB Name         : net-bnx2x
VIB Version      : 2.713.30.v60.9-1OEM.600.0.0.2494585

Message: EsxCLI.CLIFault.summary;
InnerText: There is no pnic with name vmnic2EsxCLI.CLIFault.summary
At line:47 char:21
+ ...             $vmnicDetail = $esxcli.network.nic.get.Invoke(@{nicname = ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], MethodFault
    + FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.MethodFault
 
VMkernel Name    : vmnic2
Device Name      : QLogic 57810 10 Gigabit Ethernet Adapter
Driver           : bnx2x
Driver Version   : Version 2.713.30.v60.9, Build: 2494585, Interface: 9.2 Built on: Sep 20 2017
Firmware Version : bc 7.13.75
VIB Name         : net-bnx2x
VIB Version      : 2.713.30.v60.9-1OEM.600.0.0.2494585

Message: EsxCLI.CLIFault.summary;
InnerText: There is no pnic with name vmnic3EsxCLI.CLIFault.summary
At line:47 char:21
+ ...             $vmnicDetail = $esxcli.network.nic.get.Invoke(@{nicname = ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], MethodFault
    + FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.MethodFault
 
VMkernel Name    : vmnic3
Device Name      : QLogic 57810 10 Gigabit Ethernet Adapter
Driver           : bnx2x
Driver Version   : Version 2.713.30.v60.9, Build: 2494585, Interface: 9.2 Built on: Sep 20 2017
Firmware Version : bc 7.13.75
VIB Name         : net-bnx2x
VIB Version      : 2.713.30.v60.9-1OEM.600.0.0.2494585

VMkernel Name    : vmnic4
Device Name      : QLogic 57810 10 Gigabit Ethernet Adapter
Driver           : bnx2x
Driver Version   : Version 2.713.30.v60.9, Build: 2494585, Interface: 9.2 Built on: Sep 20 2017
Firmware Version : bc 7.13.75
VIB Name         : net-bnx2x
VIB Version      : 2.713.30.v60.9-1OEM.600.0.0.2494585

VMkernel Name    : vmnic5
Device Name      : QLogic 57810 10 Gigabit Ethernet Adapter
Driver           : bnx2x
Driver Version   : Version 2.713.30.v60.9, Build: 2494585, Interface: 9.2 Built on: Sep 20 2017
Firmware Version : bc 7.13.75
VIB Name         : net-bnx2x
VIB Version      : 2.713.30.v60.9-1OEM.600.0.0.2494585

Expected behavior
PCIe device information should be retrieved successfully from all hosts which are in a connected state

Investigate issues with reporting on ESXi Host Datastore Specifications

Report generation crashed with the following error when attempting to collect ESXi Host Datastore Specifications.

Cannot bind argument to parameter 'Rows' because it is an empty collection.

Issue appears to be a missing if statement when collecting ESXi host datastore information. Currently code assumes all ESXi hosts will have a datastore. In this particular case, the report crashes when it tries to retrieve information from a vSAN witness.

To Reproduce
Steps to reproduce the behavior:

  1. Attempt to generate a vSphere report where an ESXi host does not have any datastores configured.

Expected behavior
If a host does not have any datastores, the script should bypass collection

Desktop (please complete the following information):

  • Windows 10
  • PowerCLI 11.2
  • AsBuiltReport.VMware.vSphere 0.4.1

SDRS VM Overrides shows empty "Virtual Machine" column while Cluster filtering is used

When using the Cluster filtering option some tables in the "Datastore Cluster => SDRS VM Overrides" section are returned empty.

vSphere Clusters:

PS /home/rebelinux> Get-Cluster       

Name                           HAEnabled  HAFailover DrsEnabled DrsAutomationLevel
                                          Level
----                           ---------  ---------- ---------- ------------------
RegionHQ-MGMT                  False      1          True       FullyAutomated
RegionA01-COMP                 True       1          True       FullyAutomated

PS /home/rebelinux> 

Cluster Filter:

    "Filter": {
        "Cluster": ["RegionA01-COMP"]
    },

Datastore Cluster from RegionA01-COMP Cluster:
DatastoreCluster_RegionA01-COMP

Datastore Cluster from RegionHQ-MGMT Cluster:
DatastoreCluster_RegionHQ-MGMT

I believe the Datastore Cluster need to be filtered by "Cluster": ["RegionA01-COMP"]

RegionA01-COMP Cluster VMWARE_VDI_DATASTORE SDRS VM:
RegionA01-COMP_VMWARE_VDI_DATASTORE_SDRS_VM

RegionHQ-MGMT Cluster SSD-HIGH-PERF SDRS VM:
RegionHQ-MGMT_SSD-HIGH-PERF_SDRS_VM

Machine SSL certificate information not working using the vcenter IP address as -Target

$VCenterMachineCert = ($VIMachineCertificates).Where{ ($_.EntityType -eq 'VCenter') -and ($_.Entity.Name -eq $($vCenterServerName)) }

If the report is generated using the vcenter ip address as -Target the $_.Entity.Name is equal as the IP instead of the vcenter FQDN

PS /home/rebelinux> $VIMachineCertificates = Get-VIMachineCertificate -Server  192.168.5.2   
PS /home/rebelinux> $VIMachineCertificates 

Entity                         Subject                        Issuer                         NotValidAfter
------                         -------                        ------                         -------------
192.168.5.2                    vcenter-01v.pharmax.local      pharmax-SERVER-DC-01V-CA       1/25/2024 8:33:…
esxsvr-00f.pharmax.local       esxsvr-00f.pharmax.local       vcenter-01v                    5/21/2025 11:50…
comp-02a.pharmax.local         comp-02a.pharmax.local         vcenter-01v                    5/28/2026 8:35:…
comp-01a.pharmax.local         comp-01a.pharmax.local         vcenter-01v                    5/31/2026 11:45…

PS /home/rebelinux> $VIMachineCertificates.Entity.Name                                    
192.168.5.2
esxsvr-00f.pharmax.local
comp-02a.pharmax.local
comp-01a.pharmax.local
PS /home/rebelinux> 

Target as IP:
Machine_Certificate_by_Vcenter_IP

Target as FQDN:
Machine_Certificate_by_Vcenter_FQDN

Target as FQDN Report:
Vcenter_Certificates

If a fix is not possible, it would be a good idea to update the documentation to state that the FQDN of the vcenter should be used.

new-asbuiltreport : Exception calling "Substring" with "1" argument(s): "startIndex cannot be larger than length of string

Describe the bug
Running the new-asbuiltreport results in the following error:

new-asbuiltreport : Exception calling "Substring" with "1" argument(s): "startIndex cannot be larger than length of string.
Parameter name: startIndex"
At line:1 char:1

  • new-asbuiltreport -report VMware.vSphere -username administrator@vsph ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    
    
    

To Reproduce
Steps to reproduce the behavior:
install-module PScribo
install-module asbuiltreport

Run the new-asbuiltreport with the example from the main github page:
PS C:\Windows\system32> new-asbuiltreport -report VMware.vSphere -username [email protected] -password -format html -OutputPath 'D:\As-built' -target <vcenter.fqdn>

image

Input string was not in a correct format

Describe the bug

Every time I run the report I get the same error. I've tried it a bunch of different ways, even on different machines. Its obviously connecting to the vCenter because I see cluster names in the output. I've tried on different vCenters with the same result. I always get this error after "Processing section 'Boot Device' started."

New-AsBuiltReport : Cannot convert value "N/A" to type "System.Int32". Error: "Input string was not in a correct format."
At line:1 char:1

  • New-AsBuiltReport -Target 'vcsa.domain.local' -Username 'adm ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    
    

To Reproduce
Steps to reproduce the behavior:
Run the script just like provided in the examples. This is a redacted version of the same command I'm using:
New-AsBuiltReport -Target 'vcsa.domain.local' -Username '[email protected]' -Password 'xxxxxxx' -Report VMware.vSphere -Format Html,Word -OutputPath 'C:\Users\MyAccount\Desktop\GeneratedAsBuilts' -Timestamp

Expected behavior

Screenshots
image

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Windows 10
  • Windows PowerShell version: Major: 5 Minor: 1 Build: 14393 Revision: 3053
  • 3rd party PowerShell module name and version:
    VMware.Vim 6.7.0.13964812
    VMware.VimAutomation.Cis.Core 11.3.0.13964830
    VMware.VimAutomation.Common 11.3.0.13964816
    VMware.VimAutomation.Core 11.3.0.13964826
    VMware.VimAutomation.Sdk 11.3.0.13964823
  • AsBuiltReport Core module version: 1.0.1
  • AsBuiltReport Report module name and version: 1.0.7

Additional context
This is failing "out of the box" right after newly installing the modules on a machine. Please help!

vsphere report error New-AsBuiltReport : Cannot bind argument to parameter 'Rows' because it is an empty collection.

Describe the bug
Running as built vsphere report on venter 6.7 u2 and get : Cannot bind argument to parameter 'Rows' because it is an empty collection. just after the processing licensing

To Reproduce
Steps to reproduce the behavior:
New-AsBuiltReport -Report VMware.vSphere -Target 111.222.333.444 -Username vcheck -Password z********** -Format HTML,Word -OutputPath 'd:\Reports'

Expected behavior
Report output into d:\reports.

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: server 2016
  • Windows PowerShell version
    Major Minor Build Revision

5 1 14393 2969

  • 3rd party PowerShell module name and version
    VMware PowerCLI 10.0.0 build 7895300

  • AsBuiltReport Core 1.0.0 AsBuiltReport.Core

  • AsBuiltReport Report module name and version 1.1.0 AsBuiltReport.VMware.vSphere

Provide the ability to report on specific clusters

Is your feature request related to a problem? Please describe.
Provide the ability to generate a vSphere as-built report for specific named clusters within an environment.

Describe the solution you'd like
Provide the ability for users to provide cluster names within the report JSON configuration file to filter results of the generated report.

"Filter": {
    "Cluster": ["Prod-Cluster","Dev-Cluster","QA-Cluster"]
}

Describe alternatives you've considered
No other alternatives have been considered at this point.

Additional context
Reports will contain information only related to the specified cluster names.

Error in Image Profile section

Describe the bug

New-AsBuiltReport: Message: EsxCLI.CLIFault.summary;
InnerText:  [InstallationError] Failed to initiate installer: Could not parse Vib xml from database /var/db/esximg: ('Unknown', 'Could not parse VIB XML data: None (line 0).')      cause = Could not parse Vib xml from database /var/db/esximg: ('Unknown', 'Could not parse VIB XML data: None (line 0).') Please refer to the log file for more details.EsxCLI.CLIFault.summary

To Reproduce
Steps to reproduce the behavior:

  1. Run report with $InfoLevel.VMHost >= 3
  2. See error: OperationStopped: Message: EsxCLI.CLIFault.summary;
    InnerText: [InstallationError] Failed to initiate installer: Could not parse Vib xml from database /var/db/esximg: ('Unknown', 'Could not parse VIB XML data: None (line 0).') cause = Could not parse Vib xml from database /var/db/esximg: ('Unknown', 'Could not parse VIB XML data: None (line 0).') Please refer to the log file for more details.EsxCLI.CLIFault.summary
  3. Report never get generated.

Expected behavior

  • Get the Image profile information or any method to recover from error.

Screenshots
If applicable, add screenshots to help explain your problem.

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Windows 10 x64
  • Windows PowerShell version: 5 & 7
  • 3rd party PowerShell module name and version: PowerCLI 13
  • AsBuiltReport Core module version : 1.3.0
  • AsBuiltReport Report module name and version: 1.4.0

Additional context
Add any other context about the problem here.

Issues with reporting of vCenter Server Alarms in vSphere 8.0

Generating a VMware vSphere As Built Report with vCenter InfoLevel = 5 fails when reporting the vCenter Alarms.

This issue is due to some alarms within vCenter Server 8.0 not having an Alarm name defined.

Alarm Description Enabled Entity Trigger Trigger Info
Enabled Datacenter SendSNMP:Green->Yellow (Repeat=False) --
Enabled Datacenter SendSNMP:Yellow->Red (Repeat=False) --
Enabled Datacenter SendSNMP:Red->Yellow (Repeat=False) --
Enabled Datacenter SendSNMP:Yellow->Green (Repeat=False) --

This can be corrected by modifying

$Alarms = $Alarms | Sort-Object 'Alarm', 'Trigger'

and changing it to

$Alarms = ($Alarms).Where{ $_.alarm -ne "" } | Sort-Object 'Alarm', 'Trigger'

SDRS VM Overrides display duplicate VMs if the vCenter is connected by IP and FQDN

If the vCenter is connected with PowerCLI by IP and FQDN the SDRS VM Overrides table of the Datastore Cluster section display duplicate VMs entries.

PowerCLI connected vCenter (both entry point to the same vCenter):

[DBG]: PS /home/rebelinux> $global:DefaultVIServers                                                                                               
Name                           Port  User                          
----                           ----  ----
vcenter-01v.pharmax.local      443   VSPHERE.LOCAL\Administrator
192.168.5.2                    443   VSPHERE.LOCAL\Administrator

[DBG]: PS /home/rebelinux> 

VMWARE_VDI_DATASTORE - SDRS VM Override with Duplicate entries:
VMWARE_VDI_DATASTORE_SDRS_VM_Duplicate

SSD-HIGH-PERF - SDRS VM Override with Duplicate entries:
SSD-HIGH-PERF_SDRS_VM_Duplicate

HDD-MED-PERF - SDRS VM Override with Duplicate entries:
HDD-MED-PERF_SDRS_VM_Duplicate

VMOverride variable debugging:
VMOverrides_Duplicate_VMs

VM Names need to be regex escaped for Get-View

Hi!

As to see in this output, I believe the VM-Names should be [regex]::escape()'ed before used as Parameter for Get-View.

Regards

Please wait while the VMware vSphere As Built Report is being generated.
Get-View : 2/17/2021 5:10:34 AM	Get-View		Invalid pattern '^IP-100 [LastWrite=2017-07-20_08:44:54]$' at offset 25. [x-y] range in reverse order.	
At C:\Users\***\Documents\PowerShell\Modules\AsBuiltReport.VMware.vSphere\1.2.1\Src\Private\Get-Uptime.ps1:18 char:25
+ … imeObject = Get-View -ViewType VirtualMachine -Property Name, Runtime …
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Get-View], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView
Get-View : 2/17/2021 5:11:01 AM	Get-View		Invalid pattern '^MitterDev [LastWrite=2017-01-16_10:04:10]$' at offset 28. [x-y] range in reverse order.	
At C:\Users\***\Documents\PowerShell\Modules\AsBuiltReport.VMware.vSphere\1.2.1\Src\Private\Get-Uptime.ps1:18 char:25
+ … imeObject = Get-View -ViewType VirtualMachine -Property Name, Runtime …
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Get-View], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView
Get-View : 2/17/2021 5:11:37 AM	Get-View		Invalid pattern '^SCCCL12 [LastWrite=2020-04-08_08:12:11]$' at offset 29. [x-y] range in reverse order.	
At C:\Users\***\Documents\PowerShell\Modules\AsBuiltReport.VMware.vSphere\1.2.1\Src\Private\Get-Uptime.ps1:18 char:25
+ … imeObject = Get-View -ViewType VirtualMachine -Property Name, Runtime …
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Get-View], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView
Get-View : 2/17/2021 5:11:48 AM	Get-View		Invalid pattern '^SCCCL49 - Win8.1 - WinCCV7.3 [LastWrite=2018-08-17_14:12:32]$' at offset 47. [x-y] range in reverse order.	
At C:\Users\***\Documents\PowerShell\Modules\AsBuiltReport.VMware.vSphere\1.2.1\Src\Private\Get-Uptime.ps1:18 char:25
+ … imeObject = Get-View -ViewType VirtualMachine -Property Name, Runtime …
+               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Get-View], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView
VMware vSphere As Built Report '2021-02-17_05-07-32_vSphereAbrInventory' has been saved to '\\xxxx'

Issues with reporting of PCI Devices with VMware ESXi 8.0 hosts

Generating a VMware vSphere As Built Report with VMHost InfoLevel >=3 fails when collecting PCI Device information from VMware ESXi 8.0 hosts.

During investigation it has been found that the following code does not return any results on an ESXi 8.0 host, but has worked previously on ESXi 7.0 U3 hosts.

$vmhost = get-vmhost labesxi1.lab.local
$esxcli = Get-EsxCLI -VMHost $vmhost -V2
$esxcli.hardware.pci.list.Invoke() | Where-Object { $_.VMkernelName -match 'vmhba|vmnic|vmgfx' -and $_.ModuleName -ne 'None'}

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server

Describe the bug
A clear and concise description of what the bug is.

When the script is running, suddenly after some time a message that say appear:

New-AsBuiltReport : The underlying connection was closed: A connection that was expected to be kept alive
was closed by the server.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the folder where the script is
  2. Click on 'open an powershell in admin mode (where trying with PS ISE, PS v5 and PS v7 as well'
  3. Run command New-AsBuiltReport -Report VMware.vSphere -Target 'vCenterFQDN' -EnableHealthCheck -Verbose

image

Expected behavior
That the DOc document were generated.

Screenshots
If applicable, add screenshots to help explain your problem.

System (please provide the following information about the system from which you are trying to generate a report):

  • OS: Windows 10
  • Windows PowerShell version

image
image
image

  • 3rd party PowerShell module name and version [e.g. VMware PowerCLI 11.2]
    image

  • AsBuiltReport Core module version [e.g. 1.0.0]

  • AsBuiltReport Report module name and version [e.g. AsBuiltReport.VMware.vSphere 1.0.0]

image

Additional context
vCenter versioon 6.5
user with admin privileges on domain ([email protected])
I have to run this amazing tool with several vCenters and only in 1 on those had those problems. it has 4300 vms and 250 hosts

Report terminating with error You cannot call a method on a null-valued expression

Good Afternoon,

This is my first time trying to run this report and I'm running into an issue on mulitple vCenters that I can't seem to move past. I've tried using both the IP address as well as the FQDN of the vCenter with no success.

New-AsBuiltReport : You cannot call a method on a null-valued expression.

ModuleType Version Name ExportedCommands


Manifest 1.0.0 AsBuiltReport
Script 0.2.0 AsBuiltReport.Cisco.UcsManager Invoke-AsBuiltReport.Cisco.UcsManager
Script 1.0.0 AsBuiltReport.Core {New-AsBuiltReport, New-AsBuiltConfig, New-AsBuiltReportConfig}
Script 0.4.1 AsBuiltReport.PureStorage.FlashA... Invoke-AsBuiltReport.PureStorage.FlashArray
Script 0.4.1 AsBuiltReport.VMware.NSXv Invoke

vSphere 6.5 Build 8815520
Powershell Version 5.1 Build 14409 Revision 1018

New-AsBuiltReport -Target 'VCNAME' -Username 'USERNAME' -Password 'PASSWORD' -Report VMware.vSphere -Format Html,Word -OutputPath 'C:\TEMP' -Timestamp

VERBOSE: [ 12:35:53:743 ] [ Document ] - Document 'VMware vSphere As Built Report - 2019-05-20_12.35.53' processing started.
VERBOSE: [ 12:35:53:844 ] [ Document ] - Setting global document options.
VERBOSE: [ 12:35:53:845 ] [ Document ] - Enabling section/heading numbering.
VERBOSE: [ 12:35:53:846 ] [ Document ] - Setting default font(s) to 'Arial'.
VERBOSE: [ 12:35:53:847 ] [ Document ] - Setting page top margin to '25.05'mm.
VERBOSE: [ 12:35:53:852 ] [ Document ] - Setting page right margin to '25.05'mm.
VERBOSE: [ 12:35:53:853 ] [ Document ] - Setting page bottom margin to '25.05'mm.
VERBOSE: [ 12:35:53:854 ] [ Document ] - Setting page left margin to '25.05'mm.
VERBOSE: [ 12:35:53:858 ] [ Document ] - Setting page size to 'A4'.
VERBOSE: [ 12:35:53:859 ] [ Document ] - Setting page orientation to 'Portrait'.
VERBOSE: [ 12:35:53:861 ] [ Document ] - Setting page height to '297'mm.
VERBOSE: [ 12:35:53:863 ] [ Document ] - Setting page width to '210'mm.
VERBOSE: [ 12:35:53:864 ] [ Document ] - Setting document style 'Title'.
VERBOSE: [ 12:35:53:870 ] [ Document ] - Setting document style 'Title2'.
VERBOSE: [ 12:35:53:872 ] [ Document ] - Setting document style 'Title3'.
VERBOSE: [ 12:35:53:875 ] [ Document ] - Setting document style 'Heading1'.
VERBOSE: [ 12:35:53:877 ] [ Document ] - Setting document style 'Heading2'.
VERBOSE: [ 12:35:53:880 ] [ Document ] - Setting document style 'Heading3'.
VERBOSE: [ 12:35:53:888 ] [ Document ] - Setting document style 'Heading4'.
VERBOSE: [ 12:35:53:891 ] [ Document ] - Setting document style 'Heading5'.
VERBOSE: [ 12:35:53:897 ] [ Document ] - Setting document style 'H1ExcludeTOC'.
VERBOSE: [ 12:35:53:900 ] [ Document ] - Setting document style 'Normal'.
VERBOSE: [ 12:35:53:902 ] [ Document ] - Setting document style 'TOC'.
VERBOSE: [ 12:35:53:904 ] [ Document ] - Setting document style 'TableDefaultHeading'.
VERBOSE: [ 12:35:53:908 ] [ Document ] - Setting document style 'TableDefaultRow'.
VERBOSE: [ 12:35:53:913 ] [ Document ] - Setting document style 'TableDefaultAltRow'.
VERBOSE: [ 12:35:53:916 ] [ Document ] - Setting document style 'Critical'.
VERBOSE: [ 12:35:53:918 ] [ Document ] - Setting document style 'Warning'.
VERBOSE: [ 12:35:53:920 ] [ Document ] - Setting document style 'Info'.
VERBOSE: [ 12:35:53:922 ] [ Document ] - Setting document style 'OK'.
VERBOSE: [ 12:35:53:925 ] [ Document ] - Setting table style 'TableDefault'.
VERBOSE: [ 12:35:53:928 ] [ Document ] - Setting table style 'Borderless'.
VERBOSE: [ 12:35:53:930 ] [ Document ] - Processing blank line.
VERBOSE: [ 12:35:53:932 ] [ Document ] - Processing paragraph 'VMware vSphere As Built Report'.
VERBOSE: [ 12:35:53:934 ] [ Document ] - Processing blank line.
VERBOSE: [ 12:35:53:937 ] [ Document ] - Processing table 'Cover Page'.
VERBOSE: [ 12:35:53:940 ] [ Document ] - Processing page break.
VERBOSE: [ 12:35:53:947 ] [ Document ] - Processing table of contents 'Table of Contents'.
VERBOSE: [ 12:35:53:950 ] [ Document ] - Processing page break.
VERBOSE: [ 12:36:04:950 ] [ Document ] - Processing section '***' started.
VERBOSE: [ 12:36:04:992 ] [ Document ] - Processing section 'vCenter Server' started.
VERBOSE: [ 12:36:05:005 ] [ Document ] - Processing paragraph 'The following section provides infor[..]'.
VERBOSE: [ 12:36:05:006 ] [ Document ] - Processing blank line.
VERBOSE: [ 12:36:05:355 ] [ Document ] - Processing table 'redacted vCenter Server Detailed Information'.
VERBOSE: [ 12:36:05:406 ] [ Document ] - Processing section 'Database Settings' started.
VERBOSE: [ 12:36:05:471 ] [ Document ] - Processing table 'redacted vCenter Server Database Configuration'.
VERBOSE: [ 12:36:05:494 ] [ Document ] - Processing section 'Database Settings' completed.
VERBOSE: [ 12:36:05:498 ] [ Document ] - Processing section 'Mail Settings' started.
VERBOSE: [ 12:36:05:600 ] [ Document ] - Processing table 'redacted vCenter Server Mail Configuration'.
VERBOSE: [ 12:36:05:611 ] [ Document ] - Processing section 'Mail Settings' completed.
VERBOSE: [ 12:36:05:613 ] [ Document ] - Processing section 'Historical Statistics' started.
VERBOSE: [ 12:36:06:417 ] [ Document ] - Processing table 'redacted vCenter Server vHistorical Statistics'.
VERBOSE: [ 12:36:06:457 ] [ Document ] - Processing section 'Historical Statistics' completed.
VERBOSE: [ 12:36:06:460 ] [ Document ] - Processing section 'Licensing' started.
New-AsBuiltReport : You cannot call a method on a null-valued expression.
At line:1 char:1

  • New-AsBuiltReport -Target 'redacted' -User ...
  •   + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
      + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-AsBuiltReport
    

Issues with generating reports when running against VMware on Cloud solutions (VCF, VMC, AVS, GVE)

Describe the bug
When attempting to generate an as-built against a VMware on Cloud solution, such as VMware Cloud on AWS (VMC), Azure VMware Solution or Google VMware Engine, errors are generated or the report fails to generate.

This issue is due to restricted user permissions assigned to the default cloud administrator role [cloudadmin (VMC, AVS), cloudowner (GVE)] within these VMware on Cloud solutions.

To Reproduce
Running a VMware vSphere as built report against a VMware on Cloud solution using the default admin role will cause errors due to restricted user privileges.
These errors have been observed when;

  • vCenter InfoLevel is 3 or higher
  • Host InfoLevel is 3 or higher
  • Cluster InfoLevel is 4 or higher

Workarounds
Implement the following to produce an as-built for a VMware on Cloud environment.
Within the VMware vSphere report configuration file AsBuiltReport.VMware.vSphere.json;

  • Set vCenter InfoLevel to 2 or lower
  • Set Host InfoLevel to 2 or lower
  • Set Cluster InfoLevel to 3 or lower

Expected behavior
The required user privileges to generate a VMware vSphere report are not provided with VMware on Cloud solutions.

The default user privileges for these VMware on Cloud solutions are defined as follows;
VMware Cloud on AWS
Azure VMware Solution
Google VMware Engine

Additional context
We will attempt to address and resolve these issues in a future release.

Record the TPM State of each node and if encryption enabled, backup the keys of each node into the report

Since TPM should now be implemented for all deployments, can this detail be added to the report?

Link with example code:
https://vm.knutsson.it/2021/07/powercli-tpm-encryption-recovery-key-backup/

I got bitten by this after a recent deployment where the keys were not recorded and a node failed a couple of weeks after. Recovery would have been possible and faster had i recorded all the keys.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.