diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index afad9c9..0000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,31 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-
----
-
-**Describe the bug**
-A clear and concise description of what the bug is.
-
-**To Reproduce**
-Steps to reproduce the behavior:
-1. Go to '...'
-2. Click on '....'
-3. Scroll down to '....'
-4. See error
-
-**Expected behavior**
-A clear and concise description of what you expected to happen.
-
-**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: [e.g. Windows 10]
- - Windows PowerShell version [Provide output from the following command: `$PSVersionTable.PSVersion`]
- - 3rd party PowerShell module name and version [e.g. VMware PowerCLI 11.2]
- - AsBuiltReport Core module version [e.g. 1.0.0]
- - AsBuiltReport Report module name and version [e.g. AsBuiltReport.VMware.vSphere 1.0.0]
-
-**Additional context**
-Add any other context about the problem here.
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 0000000..5306cae
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,98 @@
+name: Bug Report
+description: File a bug report
+labels: ["bug"]
+assignees:
+ - tpcarman
+body:
+ - type: textarea
+ id: bug-description
+ attributes:
+ label: Bug description
+ description: >-
+ Please provide a clear and concise description of the bug.
+ validations:
+ required: true
+ - type: input
+ id: command-line-input
+ attributes:
+ label: Command-line input
+ description: >-
+ Please provide the command line input you are using to run AsBuiltReport. Please ensure that you obscure any sensitive information.
+ placeholder: New-AsBuiltReport -Report VMware.vSphere -Target xxxxxxx -Format Word,HTML -OutputFolderPath 'C:\Users\..\Documents' -AsBuiltConfigFilePath 'C:\Users\..\AsBuiltReport\AsBuiltReport.json' -ReportConfigFilePath 'C:\Users\..\AsBuiltReport\AsBuiltReport.VMware.vSphere.json' -EnableHealthCheck -Verbose
+ validations:
+ required: true
+ - type: textarea
+ id: steps-to-reproduce
+ attributes:
+ label: Steps to reproduce
+ description: >-
+ Please provide a detailed list of steps to reproduce the bug.
+ placeholder: |-
+ 1. ....
+ 2. ....
+ 3. ....
+ validations:
+ required: true
+ - type: textarea
+ id: expected-behaviour
+ attributes:
+ label: Expected behaviour
+ description: >-
+ Please provide a clear and concise description of what you expected to happen.
+ validations:
+ required: true
+ - type: textarea
+ id: screenshots
+ attributes:
+ label: Screenshots
+ description: >-
+ Please attach any screenshots to help explain the problem. Please ensure that you obscure any sensitive information.
+ placeholder: |-
+ Drag and drop screenshots here.
+ - type: textarea
+ id: operating-system
+ attributes:
+ label: Operating System
+ description: Please provide information about the operating system are you using.
+ placeholder: macOS Big Sur, Windows 10, Ubuntu 20.04 LTS
+ validations:
+ required: true
+ - type: textarea
+ id: powershell-version
+ attributes:
+ label: PowerShell Version
+ description: Please provide information about the PowerShell version you are using. Please provide the output from the following PowerShell command `$PSVersionTable`.
+ placeholder: $PSVersionTable
+ validations:
+ required: true
+ - type: textarea
+ id: powershell-modules
+ attributes:
+ label: PowerShell Modules
+ description: Please provide information about the PowerShell modules are you using. Please provide the output from the following PowerShell command `Get-Module -ListAvailable @("AsBuiltReport.Core";"AsBuiltReport.VMware.vSphere";"PSPKI";"PScriboCharts";"PScribo") | Select Name, Version`
+ placeholder: Get-Module -ListAvailable @("AsBuiltReport.Core";"AsBuiltReport.VMware.vSphere";"PScribo") | Select Name, Version
+ validations:
+ required: true
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: Additional Context
+ description: This field is optional. You may provide additional context for the bug you wish to report. You may wish to include links to any related [issues](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues) or other relevant information.
+ - type: checkboxes
+ id: checklist
+ attributes:
+ label: Before submitting
+ description: >-
+ Please ensure your bug report fulfills all of the following requirements.
+ If you are unsure of what a specific requirement means, please follow the links to learn about it and understand why it is necessary before submitting.
+ options:
+ - label: >-
+ I have read and followed the [bug reporting guidelines](https://www.asbuiltreport.com/about/contributing/#reporting-issues-and-bugs).
+ required: true
+ - label: >-
+ I have read [the documentation](https://www.asbuiltreport.com/user-guide/new-asbuiltconfig),
+ and referred to the [known issues](https://www.asbuiltreport.com/user-guide/known-issues/) before submitting this bug report.
+ required: true
+ - label: >-
+ I have checked for previously opened & closed [issues](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues) before submitting this bug report.
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/change_request.yml b/.github/ISSUE_TEMPLATE/change_request.yml
new file mode 100644
index 0000000..ff82399
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/change_request.yml
@@ -0,0 +1,34 @@
+name: Change Request
+description: Request a new change or an improvement
+labels: ["change request"]
+assignees:
+ - tpcarman
+body:
+ - type: textarea
+ id: description
+ attributes:
+ label: Description
+ description: >-
+ Please provide a detailed description of your idea so that the project maintainers and contributors can fully understand what change, feature, or improvement you are proposing.
+ validations:
+ required: true
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: Additional Context
+ description: This field is optional. You may provide additional context for the idea you wish to propose. You may wish to include links to any related [issues](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues) or other relevant information.
+ - type: checkboxes
+ id: checklist
+ attributes:
+ label: Before submitting
+ description: >-
+ Please ensure your change request fulfills all of the following requirements.
+ If you are unsure of what a specific requirement means, please follow the links to learn about it and understand why it is necessary before submitting.
+ options:
+ - label: >-
+ I have read [the documentation](https://www.asbuiltreport.com/user-guide/new-asbuiltconfig),
+ and referred to the [known issues](https://www.asbuiltreport.com/user-guide/known-issues/) before submitting this change request.
+ required: true
+ - label: >-
+ I have checked for previously opened & closed [issues](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues) before submitting this change request.
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..ec4bb38
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1 @@
+blank_issues_enabled: false
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
index 066b2d9..0000000
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-name: Feature request
-about: Suggest an idea for this project
-
----
-
-**Is your feature request related to a problem? Please describe.**
-A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-
-**Describe the solution you'd like**
-A clear and concise description of what you want to happen.
-
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions or features you've considered.
-
-**Additional context**
-Add any other context or screenshots about the feature request here.
diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml
index ea0f6aa..5b99292 100644
--- a/.github/workflows/Release.yml
+++ b/.github/workflows/Release.yml
@@ -6,7 +6,7 @@ on:
jobs:
publish-to-gallery:
- runs-on: ubuntu-latest
+ runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Set PSRepository to Trusted for PowerShell Gallery
@@ -17,11 +17,16 @@ jobs:
shell: pwsh
run: |
Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force
+ - name: Test Module Manifest
+ shell: pwsh
+ run: |
+ Test-ModuleManifest .\AsBuiltReport.VMware.vSphere.psd1
- name: Publish module to PowerShell Gallery
shell: pwsh
run: |
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
tweet:
+ needs: publish-to-gallery
runs-on: ubuntu-latest
steps:
- uses: Eomm/why-don-t-you-tweet@v1
diff --git a/AsBuiltReport.VMware.vSphere.Style.ps1 b/AsBuiltReport.VMware.vSphere.Style.ps1
index dc88f6c..becbab0 100644
--- a/AsBuiltReport.VMware.vSphere.Style.ps1
+++ b/AsBuiltReport.VMware.vSphere.Style.ps1
@@ -11,14 +11,15 @@ Style -Name 'Heading 1' -Size 16 -Color '00364D'
Style -Name 'Heading 2' -Size 14 -Color '004B6B'
Style -Name 'Heading 3' -Size 12 -Color '00567A'
Style -Name 'Heading 4' -Size 11 -Color '00648F'
+Style -Name 'NO TOC Heading 4' -Size 11 -Color '00648F'
Style -Name 'Heading 5' -Size 10 -Color '0072A3'
+Style -Name 'NO TOC Heading 5' -Size 10 -Color '0072A3'
Style -Name 'Normal' -Size 10 -Color '565656' -Default
Style -Name 'Caption' -Size 10 -Color '565656' -Italic -Align Center
Style -Name 'Header' -Size 10 -Color '565656' -Align Center
Style -Name 'Footer' -Size 10 -Color '565656' -Align Center
Style -Name 'TOC' -Size 16 -Color '00364D'
-#Style -Name 'TableDefaultHeading' -Size 10 -Color '565656' -BackgroundColor 'FAFAFA' # Light Theme
-Style -Name 'TableDefaultHeading' -Size 10 -Color 'FAFAFA' -BackgroundColor '00364D' # Dark Theme
+Style -Name 'TableDefaultHeading' -Size 10 -Color 'FAFAFA' -BackgroundColor '00364D'
Style -Name 'TableDefaultRow' -Size 10 -Color '565656'
Style -Name 'Critical' -Size 10 -Color '565656' -BackgroundColor 'FEDDD7'
Style -Name 'Warning' -Size 10 -Color '565656' -BackgroundColor 'FFF4C7'
@@ -30,8 +31,7 @@ $TableDefaultProperties = @{
Id = 'TableDefault'
HeaderStyle = 'TableDefaultHeading'
RowStyle = 'TableDefaultRow'
- #BorderColor = 'A6A6A6' # Light Theme
- BorderColor = '00364D' # Dark Theme
+ BorderColor = '00364D'
Align = 'Left'
CaptionStyle = 'Caption'
CaptionLocation = 'Below'
diff --git a/AsBuiltReport.VMware.vSphere.psd1 b/AsBuiltReport.VMware.vSphere.psd1
index 9629101..0d9cadb 100644
--- a/AsBuiltReport.VMware.vSphere.psd1
+++ b/AsBuiltReport.VMware.vSphere.psd1
@@ -12,7 +12,7 @@
RootModule = 'AsBuiltReport.VMware.vSphere.psm1'
# Version number of this module.
- ModuleVersion = '1.3.3.1'
+ ModuleVersion = '1.3.4'
# Supported PSEditions
# CompatiblePSEditions = 'Desktop'
@@ -105,13 +105,13 @@
ProjectUri = 'https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere'
# A URL to an icon representing this module.
- IconUri = 'https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport/master/AsBuiltReport.png'
+ IconUri = ' https://github.com/AsBuiltReport.png'
# ReleaseNotes of this module
ReleaseNotes = 'https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/master/CHANGELOG.md'
# Prerelease string of this module
- # Prerelease = ''
+ Prerelease = 'rc1'
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 781c44f..78e8f8e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,22 @@
# :arrows_clockwise: VMware vSphere As Built Report Changelog
+## [[1.3.4-RC1](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/releases/tag/v1.3.4-RC1)] - 2023-12-01
+
+### Changed
+- Updated VMware PowerCLI requirements to version 13.2 ([Fix #107](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/107))
+- Improved bug and feature request templates (@rebelinux)
+- Improved TOC structure
+- Updated VMware style script for improved TOC structure
+
+### Fixed
+- Updated VMHost PCI Devices reporting to fix issues with ESXi 8.x hosts (@orb71) ([Fix #105](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/105)) & ([Fix #111](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/111))
+- Added Try/Catch stated PCI Drivers and Firmware section to provide a workaround for ESXi 8.x hosts ([Fix #116](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/116))
+- Updated vCenter Server alarms reporting ([Fix #106](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/106))
+- Fixed issue with Platform Services Controller reporting ([Fix #103](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/103))
+
+### Removed
+- Removed reporting of vCenter Server OS type
+
## [[1.3.3.1](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/releases/tag/v1.3.3.1)] - 2022-04-21
### Added
diff --git a/README.md b/README.md
index 58b2879..066a436 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+
@@ -23,6 +23,10 @@
+
+
+
+
# VMware vSphere As Built Report
VMware vSphere As Built Report is a PowerShell module which works in conjunction with [AsBuiltReport.Core](https://github.com/AsBuiltReport/AsBuiltReport.Core).
@@ -186,50 +190,50 @@ 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](https://via.placeholder.com/15/FEDDD7/000000?text=+) Not Configured |
-| Licensing | true / false | true | Highlights product evaluation licenses | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Product evaluation license in use |
-| Alarms | true / false | true | Highlights vCenter Server alarms which are disabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Alarm disabled |
+| Mail | true / false | true | Highlights mail settings which are not configured | ![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) Not Configured |
+| Licensing | true / false | true | Highlights product evaluation licenses | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Product evaluation license in use |
+| Alarms | true / false | true | Highlights vCenter Server alarms which are disabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) 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](https://via.placeholder.com/15/FFF4C7/000000?text=+) vSphere HA disabled |
-| HAAdmissionControl | true / false | true | Highlights vSphere Clusters which do not have vSphere HA Admission Control enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) vSphere HA Admission Control disabled |
-| HostFailureResponse | true / false | true | Highlights vSphere Clusters which have vSphere HA Failure Response set to disabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) vSphere HA Host Failure Response disabled |
-| HostMonitoring | true / false | true | Highlights vSphere Clusters which do not have vSphere HA Host Monitoring enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) vSphere HA Host Monitoring disabled |
-| DatastoreOnPDL | true / false | true | Highlights vSphere Clusters which do not have Datastore on PDL enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) vSphere HA Datastore on PDL disabled |
-| DatastoreOnAPD | true / false | true | Highlights vSphere Clusters which do not have Datastore on APD enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) vSphere HA Datastore on APD disabled |
-| APDTimeOut | true / false | true | Highlights vSphere Clusters which do not have APDTimeOut enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) APDTimeOut disabled |
-| vmMonitoing | true / false | true | Highlights vSphere Clusters which do not have VM Monitoting enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) VM Monitoring disabled |
-| DRSEnabled | true / false | true | Highlights vSphere Clusters which do not have vSphere DRS enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) vSphere DRS disabled |
-| DRSAutomationLevelFullyAuto | true / false | true | Checks the vSphere DRS Automation Level is set to 'Fully Automated' | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) vSphere DRS Automation Level not set to 'Fully Automated' |
-| PredictiveDRS | true / false | false | Highlights vSphere Clusters which do not have Predictive DRS enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Predictive DRS disabled |
-| DRSVMHostRules | true / false | true | Highlights DRS VMHost rules which are disabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) DRS VMHost rule disabled |
-| DRSRules | true / false | true | Highlights DRS rules which are disabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) DRS rule disabled |
-| vSANEnabled | true / false | true | Highlights vSphere Clusters which do not have Virtual SAN enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Virtual SAN disabled |
-| EVCEnabled | true / false | true | Highlights vSphere Clusters which do not have Enhanced vMotion Compatibility (EVC) enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) vSphere EVC disabled |
-| VUMCompliance | true / false | true | Highlights vSphere Clusters which do not comply with VMware Update Manager baselines | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Unknown
![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) Not Compliant |
+| HAEnabled | true / false | true | Highlights vSphere Clusters which do not have vSphere HA enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) vSphere HA disabled |
+| HAAdmissionControl | true / false | true | Highlights vSphere Clusters which do not have vSphere HA Admission Control enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) vSphere HA Admission Control disabled |
+| HostFailureResponse | true / false | true | Highlights vSphere Clusters which have vSphere HA Failure Response set to disabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) vSphere HA Host Failure Response disabled |
+| HostMonitoring | true / false | true | Highlights vSphere Clusters which do not have vSphere HA Host Monitoring enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) vSphere HA Host Monitoring disabled |
+| DatastoreOnPDL | true / false | true | Highlights vSphere Clusters which do not have Datastore on PDL enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) vSphere HA Datastore on PDL disabled |
+| DatastoreOnAPD | true / false | true | Highlights vSphere Clusters which do not have Datastore on APD enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) vSphere HA Datastore on APD disabled |
+| APDTimeOut | true / false | true | Highlights vSphere Clusters which do not have APDTimeOut enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) APDTimeOut disabled |
+| vmMonitoing | true / false | true | Highlights vSphere Clusters which do not have VM Monitoting enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) VM Monitoring disabled |
+| DRSEnabled | true / false | true | Highlights vSphere Clusters which do not have vSphere DRS enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) vSphere DRS disabled |
+| DRSAutomationLevelFullyAuto | true / false | true | Checks the vSphere DRS Automation Level is set to 'Fully Automated' | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) vSphere DRS Automation Level not set to 'Fully Automated' |
+| PredictiveDRS | true / false | false | Highlights vSphere Clusters which do not have Predictive DRS enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Predictive DRS disabled |
+| DRSVMHostRules | true / false | true | Highlights DRS VMHost rules which are disabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) DRS VMHost rule disabled |
+| DRSRules | true / false | true | Highlights DRS rules which are disabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) DRS rule disabled |
+| vSANEnabled | true / false | true | Highlights vSphere Clusters which do not have Virtual SAN enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Virtual SAN disabled |
+| EVCEnabled | true / false | true | Highlights vSphere Clusters which do not have Enhanced vMotion Compatibility (EVC) enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) vSphere EVC disabled |
+| VUMCompliance | true / false | true | Highlights vSphere Clusters which do not comply with VMware Update Manager baselines | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Unknown
![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) 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](https://via.placeholder.com/15/FFF4C7/000000?text=+) Maintenance
![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) Disconnected |
-| HyperThreading | true / false | true | Highlights VMHosts which have HyperThreading disabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) HyperThreading disabled
|
-| ScratchLocation | true / false | true | Highlights VMHosts which are configured with the default scratch location | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Scratch location is /tmp/scratch |
-| IPv6 | true / false | true | Highlights VMHosts which do not have IPv6 enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) IPv6 disabled |
-| UpTimeDays | true / false | true | Highlights VMHosts with uptime days greater than 9 months | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) 9 - 12 months
![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) >12 months |
-| Licensing | true / false | true | Highlights VMHosts which are using production evaluation licenses | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Product evaluation license in use |
-| SSH | true / false | true | Highlights if the SSH service is enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) TSM / TSM-SSH service enabled |
-| ESXiShell | true / false | true | Highlights if the ESXi Shell service is enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) TSM / TSM-EsxiShell service enabled |
-| NTP | true / false | true | Highlights if the NTP service has stopped or is disabled on a VMHost | ![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) NTP service stopped / disabled |
-| StorageAdapter | true / false | true | Highlights storage adapters which are not 'Online' | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Storage adapter status is 'Unknown'
![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) 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](https://via.placeholder.com/15/FEDDD7/000000?text=+) Network adapter is 'Disconnected'
![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) Network adapter is 'Down' |
-| LockdownMode | true / false | true | Highlights VMHosts which do not have Lockdown mode enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Lockdown Mode disabled
|
-| VUMCompliance | true / false | true | Highlights VMHosts which are not compliant with VMware Update Manager software packages | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Unknown
![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) Incompatible |
+| ConnectionState | true / false | true | Highlights VMHosts which are in maintenance mode or disconnected | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Maintenance
![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) Disconnected |
+| HyperThreading | true / false | true | Highlights VMHosts which have HyperThreading disabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) HyperThreading disabled
|
+| ScratchLocation | true / false | true | Highlights VMHosts which are configured with the default scratch location | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Scratch location is /tmp/scratch |
+| IPv6 | true / false | true | Highlights VMHosts which do not have IPv6 enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) IPv6 disabled |
+| UpTimeDays | true / false | true | Highlights VMHosts with uptime days greater than 9 months | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) 9 - 12 months
![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) >12 months |
+| Licensing | true / false | true | Highlights VMHosts which are using production evaluation licenses | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Product evaluation license in use |
+| SSH | true / false | true | Highlights if the SSH service is enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) TSM / TSM-SSH service enabled |
+| ESXiShell | true / false | true | Highlights if the ESXi Shell service is enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) TSM / TSM-EsxiShell service enabled |
+| NTP | true / false | true | Highlights if the NTP service has stopped or is disabled on a VMHost | ![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) NTP service stopped / disabled |
+| StorageAdapter | true / false | true | Highlights storage adapters which are not 'Online' | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Storage adapter status is 'Unknown'
![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) 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](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) Network adapter is 'Disconnected'
![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) Network adapter is 'Down' |
+| LockdownMode | true / false | true | Highlights VMHosts which do not have Lockdown mode enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Lockdown Mode disabled
|
+| VUMCompliance | true / false | true | Highlights VMHosts which are not compliant with VMware Update Manager software packages | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Unknown
![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) Incompatible |
#### vSAN
The **vSAN** schema is used to configure health checks for vSAN.
@@ -242,30 +246,30 @@ 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](https://via.placeholder.com/15/FFF4C7/000000?text=+) 75 - 90% utilized
![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) >90% utilized |
+| CapacityUtilization | true / false | true | Highlights datastores with storage capacity utilization over 75% | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) 75 - 90% utilized
![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) >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](https://via.placeholder.com/15/FFF4C7/000000?text=+) 75 - 90% utilized
![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) >90% utilized |
-| SDRSAutomationLevelFullyAuto | true / false | true | Highlights if the Datastore Cluster SDRS Automation Level is not set to 'Fully Automated' | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Storage DRS Automation Level not set to 'Fully Automated' |
+| CapacityUtilization | true / false | true | Highlights datastore clusters with storage capacity utilization over 75% | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) 75 - 90% utilized
![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) >90% utilized |
+| SDRSAutomationLevelFullyAuto | true / false | true | Highlights if the Datastore Cluster SDRS Automation Level is not set to 'Fully Automated' | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) 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](https://via.placeholder.com/15/FFF4C7/000000?text=+) VM is powered off |
-| ConnectionState | true / false | true | Highlights VMs which are orphaned or inaccessible | ![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) VM is orphaned or inaccessible |
-| CpuHotAdd | true / false | true | Highlights virtual machines which have CPU Hot Add enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) CPU Hot Add enabled |
-| CpuHotRemove | true / false | true | Highlights virtual machines which have CPU Hot Remove enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) CPU Hot Remove enabled |
-| MemoryHotAdd | true / false | true | Highlights VMs which have Memory Hot Add enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Memory Hot Add enabled |
-| ChangeBlockTracking | true / false | true | Highlights VMs which do not have Change Block Tracking enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) Change Block Tracking disabled |
-| SpbmPolicyCompliance | true / false | true | Highlights VMs which do not comply with storage based policies | ![Warning](https://via.placeholder.com/15/FFF4C7/000000?text=+) VM storage based policy compliance is unknown
![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) 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](https://via.placeholder.com/15/FFF4C7/000000?text=+) 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](https://via.placeholder.com/15/FFF4C7/000000?text=+) VM Snapshot age >= 7 days
![Critical](https://via.placeholder.com/15/FEDDD7/000000?text=+) VM Snapshot age >= 14 days |
+| PowerState | true / false | true | Highlights VMs which are powered off | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) VM is powered off |
+| ConnectionState | true / false | true | Highlights VMs which are orphaned or inaccessible | ![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) VM is orphaned or inaccessible |
+| CpuHotAdd | true / false | true | Highlights virtual machines which have CPU Hot Add enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) CPU Hot Add enabled |
+| CpuHotRemove | true / false | true | Highlights virtual machines which have CPU Hot Remove enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) CPU Hot Remove enabled |
+| MemoryHotAdd | true / false | true | Highlights VMs which have Memory Hot Add enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Memory Hot Add enabled |
+| ChangeBlockTracking | true / false | true | Highlights VMs which do not have Change Block Tracking enabled | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) Change Block Tracking disabled |
+| SpbmPolicyCompliance | true / false | true | Highlights VMs which do not comply with storage based policies | ![Warning](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) VM storage based policy compliance is unknown
![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) 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](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) 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](https://via.placeholder.com/15/FFF4C7/FFF4C7.png) VM Snapshot age >= 7 days
![Critical](https://via.placeholder.com/15/FEDDD7/FEDDD7.png) VM Snapshot age >= 14 days |
## :computer: Examples
@@ -285,4 +289,4 @@ PS C:\> New-AsBuiltReport -Report VMware.vSphere -Target 'vcenter-01.corp.local'
# 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 'administrator@vsphere.local' -Password 'VMware1!' -Format Html,Word -OutputFolderPath 'C:\Users\Tim\Documents' -SendEmail
-```
\ No newline at end of file
+```
diff --git a/Src/Private/Get-RequiredModule.ps1 b/Src/Private/Get-RequiredModule.ps1
index 893086f..fcd0b6b 100644
--- a/Src/Private/Get-RequiredModule.ps1
+++ b/Src/Private/Get-RequiredModule.ps1
@@ -26,9 +26,9 @@ function Get-RequiredModule {
$RequiredModule = Get-Module -ListAvailable -Name $Name | Sort-Object -Property Version -Descending | Select-Object -First 1
$ModuleVersion = "$($RequiredModule.Version.Major)" + "." + "$($RequiredModule.Version.Minor)"
if ($ModuleVersion -eq ".") {
- throw "VMware PowerCLI $Version or higher is required to run the VMware vSphere As Built Report. Run 'Install-Module -Name $Name -MinimumVersion $Version' to install the required modules."
+ throw "VMware PowerCLI $Version or higher is required to run the VMware vSphere As Built Report. Run 'Install-Module -Name $Name -MinimumVersion $Version -Force' to install the required modules."
}
if ($ModuleVersion -lt $Version) {
- throw "VMware PowerCLI $Version or higher is required to run the VMware vSphere As Built Report. Run 'Update-Module -Name $Name -MinimumVersion $Version' to update the required modules."
+ throw "VMware PowerCLI $Version or higher is required to run the VMware vSphere As Built Report. Run 'Update-Module -Name $Name -MinimumVersion $Version -Force' to update the required modules."
}
}
\ No newline at end of file
diff --git a/Src/Public/Invoke-AsBuiltReport.VMware.vSphere.ps1 b/Src/Public/Invoke-AsBuiltReport.VMware.vSphere.ps1
index 52ade22..b2945af 100644
--- a/Src/Public/Invoke-AsBuiltReport.VMware.vSphere.ps1
+++ b/Src/Public/Invoke-AsBuiltReport.VMware.vSphere.ps1
@@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
.DESCRIPTION
Documents the configuration of VMware vSphere infrastucture in Word/HTML/Text formats using PScribo.
.NOTES
- Version: 1.3.3
+ Version: 1.3.4-RC1
Author: Tim Carman
Twitter: @tpcarman
Github: tpcarman
@@ -20,7 +20,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
)
# Check if the required version of VMware PowerCLI is installed
- Get-RequiredModule -Name 'VMware.PowerCLI' -Version '12.3'
+ Get-RequiredModule -Name 'VMware.PowerCLI' -Version '13.2'
# Import Report Configuration
$Report = $ReportConfig.Report
@@ -47,9 +47,9 @@ function Invoke-AsBuiltReport.VMware.vSphere {
# Check logged in user has sufficient privileges to generate an As Built Report
Write-PScriboMessage 'Checking vCenter user privileges.'
Try {
- $UserPermission = Get-VIPermission | Where-Object {$_.Principal -eq $vCenter.User}
+ $UserPermission = Get-VIPermission | Where-Object { $_.Principal -eq $vCenter.User }
$AuthMgr = Get-View $($vCenter.ExtensionData.Content.AuthorizationManager)
- $UserRole = $AuthMgr.RoleList | Where-Object {$_.Name -eq $($UserPermission.Role)}
+ $UserRole = $AuthMgr.RoleList | Where-Object { $_.Name -eq $($UserPermission.Role) }
} Catch {
Write-PScriboMessage 'Unable to obtain vCenter user privileges.'
}
@@ -168,13 +168,12 @@ function Invoke-AsBuiltReport.VMware.vSphere {
'IP Address' = ($vCenterAdvSettings | Where-Object { $_.name -like 'VirtualCenter.AutoManagedIPV4' }).Value
'Version' = $vCenter.Version
'Build' = $vCenter.Build
- 'OS Type' = $vCenter.ExtensionData.Content.About.OsType
}
#region vCenter Server Summary & Advanced Summary
if ($InfoLevel.vCenter -le 2) {
$TableParams = @{
Name = "vCenter Server Summary - $vCenterServerName"
- ColumnWidths = 20, 20, 20, 20, 20
+ ColumnWidths = 25, 25, 25, 25
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
@@ -204,7 +203,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
if ($vCenter.Version -ge 6) {
Add-Member @MemberProps -Name 'HTTP Port' -Value ($vCenterAdvSettings | Where-Object { $_.name -eq 'config.vpxd.rhttpproxy.httpport' }).Value
Add-Member @MemberProps -Name 'HTTPS Port' -Value ($vCenterAdvSettings | Where-Object { $_.name -eq 'config.vpxd.rhttpproxy.httpsport' }).Value
- Add-Member @MemberProps -Name 'Platform Services Controller' -Value (($vCenterAdvSettings | Where-Object { $_.name -eq 'config.vpxd.sso.admin.uri' }).Value -replace "^https://|/sso-adminserver/sdk/vsphere.local")
+ Add-Member @MemberProps -Name 'Platform Services Controller' -Value ((($vCenterAdvSettings).Where{ $_.name -eq 'config.vpxd.sso.admin.uri' }).Value).Split('/')[2]
}
if ($VumServer.Name) {
Add-Member @MemberProps -Name 'Update Manager Server' -Value $VumServer.Name
@@ -347,7 +346,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region vCenter Server Roles
Section -Style Heading3 'Roles' {
- $VIRoles = Get-VIRole -Server $vCenter | Where-Object {$null -ne $_.PrivilegeList} | Sort-Object Name
+ $VIRoles = Get-VIRole -Server $vCenter | Where-Object { $null -ne $_.PrivilegeList } | Sort-Object Name
$VIRoleInfo = foreach ($VIRole in $VIRoles) {
[PSCustomObject]@{
'Role' = $VIRole.Name
@@ -355,12 +354,12 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$true { 'Yes' }
$false { 'No' }
}
- 'Privilege List' = ($VIRole.PrivilegeList).Replace("."," > ") | Select-Object -Unique
+ 'Privilege List' = ($VIRole.PrivilegeList).Replace(".", " > ") | Select-Object -Unique
}
}
if ($InfoLevel.vCenter -ge 4) {
$VIRoleInfo | ForEach-Object {
- Section -Style Heading4 $($_.Role) {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC $($_.Role) {
$TableParams = @{
Name = "Role $($_.Role) - $vCenterServerName"
ColumnWidths = 35, 15, 50
@@ -374,7 +373,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
} else {
$TableParams = @{
Name = "Roles - $vCenterServerName"
- Columns = 'Role','System Role'
+ Columns = 'Role', 'System Role'
ColumnWidths = 50, 50
}
if ($Report.ShowTableCaptions) {
@@ -529,13 +528,13 @@ function Invoke-AsBuiltReport.VMware.vSphere {
}
}
}
- $Alarms = $Alarms | Sort-Object 'Alarm', 'Trigger'
+ $Alarms = ($Alarms).Where{ $_.alarm -ne "" } | Sort-Object 'Alarm', 'Trigger'
if ($Healthcheck.vCenter.Alarms) {
$Alarms | Where-Object { $_.'Enabled' -eq 'Disabled' } | Set-Style -Style Warning -Property 'Enabled'
}
if ($InfoLevel.vCenter -ge 5) {
foreach ($Alarm in $Alarms) {
- Section -Style Heading4 $($Alarm.Alarm) {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC $($Alarm.Alarm) {
$TableParams = @{
Name = "$($Alarm.Alarm) - $vCenterServerName"
List = $true
@@ -734,7 +733,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
Section -Style Heading4 'vSphere HA Configuration' {
Paragraph "The following section details the vSphere HA configuration for $Cluster cluster."
#region vSphere HA Cluster Failures and Responses
- Section -Style Heading5 'Failures and Responses' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Failures and Responses' {
$HAClusterResponses = [PSCustomObject]@{
'Host Monitoring' = $TextInfo.ToTitleCase($ClusterDasConfig.HostMonitoring)
}
@@ -836,7 +835,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion vSphere HA Cluster Failures and Responses
#region vSphere HA Cluster Admission Control
- Section -Style Heading5 'Admission Control' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Admission Control' {
$HAAdmissionControl = [PSCustomObject]@{
'Admission Control' = Switch ($Cluster.HAAdmissionControlEnabled) {
$true { 'Enabled' }
@@ -897,7 +896,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion vSphere HA Cluster Admission Control
#region vSphere HA Cluster Heartbeat Datastores
- Section -Style Heading5 'Heartbeat Datastores' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Heartbeat Datastores' {
$HeartbeatDatastores = [PSCustomObject]@{
'Heartbeat Selection Policy' = Switch ($ClusterDasConfig.HBDatastoreCandidatePolicy) {
'allFeasibleDsWithUserPreference' { 'Use datastores from the specified list and complement automatically if needed' }
@@ -926,7 +925,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region vSphere HA Cluster Advanced Options
$HAAdvancedSettings = $Cluster | Get-AdvancedSetting | Where-Object { $_.Type -eq 'ClusterHA' }
if ($HAAdvancedSettings) {
- Section -Style Heading5 'vSphere HA Advanced Options' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'vSphere HA Advanced Options' {
$HAAdvancedOptions = @()
foreach ($HAAdvancedSetting in $HAAdvancedSettings) {
$HAAdvancedOption = [PSCustomObject]@{
@@ -957,7 +956,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
Section -Style Heading4 'Proactive HA' {
Paragraph "The following section details the Proactive HA configuration for $Cluster cluster."
#region Proactive HA Failures and Responses Section
- Section -Style Heading5 'Failures and Responses' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Failures and Responses' {
$ProactiveHa = [PSCustomObject]@{
'Proactive HA' = Switch ($ClusterConfigEx.InfraUpdateHaConfig.Enabled) {
$true { 'Enabled' }
@@ -1072,7 +1071,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region DRS Cluster Additional Options
$DrsAdvancedSettings = $Cluster | Get-AdvancedSetting | Where-Object { $_.Type -eq 'ClusterDRS' }
if ($DrsAdvancedSettings) {
- Section -Style Heading5 'Additional Options' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Additional Options' {
$DrsAdditionalOptions = [PSCustomObject] @{
'VM Distribution' = Switch (($DrsAdvancedSettings | Where-Object { $_.name -eq 'TryBalanceVmsPerHost' }).Value) {
'1' { 'Enabled' }
@@ -1113,7 +1112,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region vSphere DPM Configuration
if ($ClusterConfigEx.DpmConfigInfo.Enabled) {
- Section -Style Heading5 'Power Management' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Power Management' {
$DpmConfig = [PSCustomObject]@{
'DPM' = Switch ($ClusterConfigEx.DpmConfigInfo.Enabled) {
$true { 'Enabled' }
@@ -1151,7 +1150,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region vSphere DRS Cluster Advanced Options
$DrsAdvancedSettings = $Cluster | Get-AdvancedSetting | Where-Object { $_.Type -eq 'ClusterDRS' }
if ($DrsAdvancedSettings) {
- Section -Style Heading5 'Advanced Options' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Advanced Options' {
$DrsAdvancedOptions = @()
foreach ($DrsAdvancedSetting in $DrsAdvancedSettings) {
$DrsAdvancedOption = [PSCustomObject]@{
@@ -1176,7 +1175,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$DrsClusterGroups = $Cluster | Get-DrsClusterGroup
if ($DrsClusterGroups) {
#region vSphere DRS Cluster Group Section
- Section -Style Heading5 'DRS Cluster Groups' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'DRS Cluster Groups' {
$DrsGroups = foreach ($DrsClusterGroup in $DrsClusterGroups) {
[PSCustomObject]@{
'DRS Cluster Group' = $DrsClusterGroup.Name
@@ -1205,7 +1204,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region vSphere DRS Cluster VM/Host Rules
$DrsVMHostRules = $Cluster | Get-DrsVMHostRule
if ($DrsVMHostRules) {
- Section -Style Heading5 'DRS VM/Host Rules' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'DRS VM/Host Rules' {
$DrsVMHostRuleDetail = foreach ($DrsVMHostRule in $DrsVMHostRules) {
[PSCustomObject]@{
'DRS VM/Host Rule' = $DrsVMHostRule.Name
@@ -1243,7 +1242,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$DrsRules = $Cluster | Get-DrsRule
if ($DrsRules) {
#region vSphere DRS Cluster Rules Section
- Section -Style Heading5 'DRS Rules' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'DRS Rules' {
$DrsRuleDetail = foreach ($DrsRule in $DrsRules) {
[PSCustomObject]@{
'DRS Rule' = $DrsRule.Name
@@ -1256,7 +1255,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$False { 'No' }
}
'Mandatory' = $DrsRule.Mandatory
- 'Virtual Machines' = ($DrsRule.VMIds | ForEach-Object { (Get-View -id $_).name }) -join ', '
+ 'Virtual Machines' = ($DrsRule.VMIds | ForEach-Object { (Get-View -Id $_).name }) -join ', '
}
if ($Healthcheck.Cluster.DrsRules) {
$DrsRuleDetail | Where-Object { $_.Enabled -eq 'No' } | Set-Style -Style Warning -Property 'Enabled'
@@ -1282,10 +1281,10 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$DasVmOverrides = $Cluster.ExtensionData.Configuration.DasVmConfig
if ($DrsVmOverrides -or $DasVmOverrides) {
#region VM Overrides Section
- Section -Style Heading4 'VM Overrides' {
+ Section -Style NOTOCHeading4 -ExcludeFromTOC 'VM Overrides' {
#region vSphere DRS VM Overrides
if ($DrsVmOverrides) {
- Section -Style Heading5 'vSphere DRS' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'vSphere DRS' {
$DrsVmOverrideDetails = foreach ($DrsVmOverride in $DrsVmOverrides) {
[PSCustomObject]@{
'Virtual Machine' = $VMLookup."$($DrsVmOverride.Key.Type)-$($DrsVmOverride.Key.Value)"
@@ -1315,7 +1314,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region vSphere HA VM Overrides
if ($DasVmOverrides) {
- Section -Style Heading5 'vSphere HA' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'vSphere HA' {
$DasVmOverrideDetails = foreach ($DasVmOverride in $DasVmOverrides) {
[PSCustomObject]@{
'Virtual Machine' = $VMLookup."$($DasVmOverride.Key.Type)-$($DasVmOverride.Key.Value)"
@@ -1353,7 +1352,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$DasVmOverrideDetails | Sort-Object 'Virtual Machine' | Table @TableParams
#region PDL/APD Protection Settings Section
- Section -Style Heading5 'PDL/APD Protection Settings' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'PDL/APD Protection Settings' {
$DasVmOverridePdlApd = foreach ($DasVmOverride in $DasVmOverrides) {
$DasVmComponentProtection = $DasVmOverride.DasSettings.VmComponentProtectionSettings
[PSCustomObject]@{
@@ -1398,7 +1397,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion PDL/APD Protection Settings Section
#region VM Monitoring Section
- Section -Style Heading5 'VM Monitoring' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'VM Monitoring' {
$DasVmOverrideVmMonitoring = foreach ($DasVmOverride in $DasVmOverrides) {
$DasVmMonitoring = $DasVmOverride.DasSettings.VmToolsMonitoringSettings
[PSCustomObject]@{
@@ -1519,7 +1518,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion Cluster VUM Baselines
#region Cluster VUM Compliance (Advanced Detail Information)
- if ($UserRole.Privilege -contains 'VcIntegrity.Updates.com.vmware.vcIntegrity.ViewStatus') {
+ if ($UserRole.Privilege -contains 'VcIntegrity.Updates.com.vmware.vcIntegrity.ViewStatus') {
if ($InfoLevel.Cluster -ge 4 -and $VumServer.Name) {
if ("Desktop" -eq $PSVersionTable.PsEdition) {
$ClusterCompliances = $Cluster | Get-Compliance
@@ -1560,7 +1559,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion Cluster VUM Compliance (Advanced Detail Information)
#region Cluster Permissions
- Section -Style Heading4 'Permissions' {
+ Section -Style NOTOCHeading4 -ExcludeFromTOC 'Permissions' {
Paragraph "The following table details the permissions assigned to cluster $Cluster."
BlankLine
$VIPermissions = $Cluster | Get-VIPermission
@@ -1790,7 +1789,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
}
'Asset Tag' = Switch ($VMHost.ExtensionData.Summary.Hardware.OtherIdentifyingInfo[0].IdentifierValue) {
'' { 'Unknown' }
- $null { 'Unknown' }
+ $null { 'Unknown' }
default { $VMHost.ExtensionData.Summary.Hardware.OtherIdentifyingInfo[0].IdentifierValue }
}
'Processor Type' = $VMHost.Processortype
@@ -1810,7 +1809,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
'Number of VMs' = $VMHost.ExtensionData.VM.Count
'Maximum EVC Mode' = $EvcModeLookup."$($VMHost.MaxEVCMode)"
'EVC Graphics Mode' = Switch ($VMHost.ExtensionData.Summary.CurrentEVCGraphicsModeKey) {
- $null { 'Not applicable'}
+ $null { 'Not applicable' }
default { $VMHost.ExtensionData.Summary.CurrentEVCGraphicsModeKey }
}
'Power Management Policy' = $VMHost.ExtensionData.Hardware.CpuPowerManagementInfo.CurrentPolicy
@@ -1872,10 +1871,10 @@ function Invoke-AsBuiltReport.VMware.vSphere {
Try {
$VMHostIPMI = $esxcli.hardware.ipmi.bmc.get.invoke()
} Catch {
- Write-PScriboMessage -IsWarning "Unable to collect IPMI / BMC configuration from $VMHost"
+ Write-PScriboMessage -IsWarning "Unable to collect IPMI / BMC configuration from $VMHost."
}
if ($VMHostIPMI) {
- Section -Style Heading5 'IPMI / BMC' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'IPMI / BMC' {
$VMHostIPMIInfo = [PSCustomObject]@{
'Manufacturer' = $VMHostIPMI.Manufacturer
'MAC Address' = $VMHostIPMI.MacAddress
@@ -1899,7 +1898,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion ESXi IPMI/BMC Settings
#region ESXi Host Boot Device
- Section -Style Heading5 'Boot Device' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Boot Device' {
$ESXiBootDevice = Get-ESXiBootDevice -VMHost $VMHost
$VMHostBootDevice = [PSCustomObject]@{
'Host' = $ESXiBootDevice.Host
@@ -1928,40 +1927,80 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion ESXi Host Boot Devices
#region ESXi Host PCI Devices
- Section -Style Heading5 'PCI Devices' {
- $PciHardwareDevices = $esxcli.hardware.pci.list.Invoke() | Where-Object { $_.VMkernelName -match 'vmhba|vmnic|vmgfx' -and $_.ModuleName -ne 'None'} | Sort-Object -Property VMkernelName
- $VMHostPciDevices = foreach ($PciHardwareDevice in $PciHardwareDevices) {
- [PSCustomObject]@{
- 'Device' = $PciHardwareDevice.VMkernelName
- 'PCI Address' = $PciHardwareDevice.Address
- 'Device Class' = $PciHardwareDevice.DeviceClassName
- 'Device Name' = $PciHardwareDevice.DeviceName
- 'Vendor Name' = $PciHardwareDevice.VendorName
- 'Slot Description' = $PciHardwareDevice.SlotDescription
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'PCI Devices' {
+ <# Move away from esxcli.v2 implementation to be compatible with 8.x branch.
+ 'Slot Description' information does not seem to be available through the API
+ Create an array with PCI Address and VMware Devices (vmnic,vmhba,?vmgfx?)
+ #>
+ $PciToDeviceMapping = @{}
+ $NetworkAdapters = Get-VMHostNetworkAdapter -VMHost $VMHost -Physical
+ foreach ($adapter in $NetworkAdapters) {
+ $PciToDeviceMapping[$adapter.PciId] = $adapter.DeviceName
+ }
+ $hbAdapters = Get-VMHostHba -VMHost $VMHost
+ foreach ($adapter in $hbAdapters) {
+ $PciToDeviceMapping[$adapter.Pci] = $adapter.Device
+ }
+ <# Data Object - HostGraphicsInfo(vim.host.GraphicsInfo)
+ This function has been available since version 5.5, but we can't be sure if it is still valid.
+ I don't have access to a vGPU-enabled system.
+ #>
+ $GpuAdapters = (Get-VMHost $VMhost | Get-View -Property Config).Config.GraphicsInfo
+ foreach ($adapter in $GpuAdapters) {
+ $PciToDeviceMapping[$adapter.pciId] = $adapter.deviceName
+ }
+
+ $VMHostPciDevice = @{
+ VMHost = $VMHost
+ DeviceClass = @('MassStorageController', 'NetworkController', 'DisplayController', 'SerialBusController')
+ }
+ $PciDevices = Get-VMHostPciDevice @VMHostPciDevice
+
+ # Combine PciDevices and PciToDeviceMapping
+
+ $VMHostPciDevices = $PciDevices | ForEach-Object {
+ $PciDevice = $_
+ $device = $PCIToDeviceMapping[$pciDevice.Id]
+
+ if ($device) {
+ [PSCustomObject]@{
+ 'Device' = $device
+ 'PCI Address' = $PciDevice.Id
+ 'Device Class' = $PciDevice.DeviceClass -replace ('Controller', "")
+ 'Device Name' = $PciDevice.DeviceName
+ 'Vendor Name' = $PciDevice.VendorName
+ }
}
}
+
$TableParams = @{
Name = "PCI Devices - $VMHost"
- ColumnWidths = 12, 13, 15, 25, 20, 15
+ ColumnWidths = 17, 18, 15, 30, 20
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
}
- $VMHostPciDevices | Table @TableParams
+ $VMHostPciDevices | Sort-Object 'Device' | Table @TableParams
}
#endregion ESXi Host PCI Devices
#region ESXi Host PCI Devices Drivers & Firmware
- Section -Style Heading5 'PCI Devices Drivers & Firmware' {
- $VMHostPciDevicesDetails = Get-PciDeviceDetail -Server $vCenter -esxcli $esxcli | Sort-Object 'Device'
- $TableParams = @{
- Name = "PCI Devices Drivers & Firmware - $VMHost"
- ColumnWidths = 12, 20, 11, 19, 11, 11, 16
- }
- if ($Report.ShowTableCaptions) {
- $TableParams['Caption'] = "- $($TableParams.Name)"
+ $VMHostPciDevicesDetails = Get-PciDeviceDetail -Server $vCenter -esxcli $esxcli | Sort-Object 'Device'
+ if ($VMHostPciDevicesDetails) {
+ Try {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'PCI Devices Drivers & Firmware' {
+ $TableParams = @{
+ Name = "PCI Devices Drivers & Firmware - $VMHost"
+ ColumnWidths = 12, 20, 11, 19, 11, 11, 16
+ }
+ if ($Report.ShowTableCaptions) {
+ $TableParams['Caption'] = "- $($TableParams.Name)"
+ }
+ $VMHostPciDevicesDetails | Table @TableParams
+ }
+ } Catch {
+ Write-PScriboMessage -IsWarning "Unable to collect PCI Devices Drivers & Firmware configuration from $VMhost."
}
- $VMHostPciDevicesDetails | Table @TableParams
}
#endregion ESXi Host PCI Devices Drivers & Firmware
}
@@ -1972,7 +2011,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
Paragraph "The following section details the host system configuration for $VMHost."
#region ESXi Host Profile Information
if ($VMHost | Get-VMHostProfile) {
- Section -Style Heading5 'Host Profile' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Host Profile' {
$VMHostProfile = $VMHost | Get-VMHostProfile | Select-Object Name, Description
$TableParams = @{
Name = "Host Profile - $VMHost"
@@ -1988,7 +2027,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region ESXi Host Image Profile Information
if ($UserRole.Privilege -contains 'Host.Config.Settings') {
- Section -Style Heading5 'Image Profile' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Image Profile' {
$installdate = Get-InstallDate
$esxcli = Get-EsxCli -VMHost $VMHost -V2 -Server $vCenter
$ImageProfile = $esxcli.software.profile.get.Invoke()
@@ -2012,7 +2051,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion ESXi Host Image Profile Information
#region ESXi Host Time Configuration
- Section -Style Heading5 'Time Configuration' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Time Configuration' {
$VMHostTimeSettings = [PSCustomObject]@{
'Time Zone' = $VMHost.timezone
'NTP Service' = Switch ((Get-VMHostService -VMHost $VMHost | Where-Object { $_.key -eq 'ntpd' }).Running) {
@@ -2038,7 +2077,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region ESXi Host Syslog Configuration
$SyslogConfig = $VMHost | Get-VMHostSysLogServer
if ($SyslogConfig) {
- Section -Style Heading5 'Syslog Configuration' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Syslog Configuration' {
# TODO: Syslog Rotate & Size, Log Directory (Adv Settings)
$SyslogConfig = $SyslogConfig | Select-Object @{L = 'SysLog Server'; E = { $_.Host } }, Port
$TableParams = @{
@@ -2062,7 +2101,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
Write-PScriboMessage 'ESXi VUM baseline information is not currently available with your version of PowerShell.'
}
if ($VMHostPatchBaselines) {
- Section -Style Heading5 'Update Manager Baselines' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Update Manager Baselines' {
$VMHostBaselines = foreach ($VMHostBaseline in $VMHostPatchBaselines) {
[PSCustomObject]@{
'Baseline' = $VMHostBaseline.Name
@@ -2090,7 +2129,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion ESXi Update Manager Baseline Information
#region ESXi Update Manager Compliance Information
- if ($UserRole.Privilege -contains 'VcIntegrity.Updates.com.vmware.vcIntegrity.ViewStatus') {
+ if ($UserRole.Privilege -contains 'VcIntegrity.Updates.com.vmware.vcIntegrity.ViewStatus') {
if ($VumServer.Name) {
if ("Desktop" -eq $PSVersionTable.PsEdition) {
$VMHostCompliances = $VMHost | Get-Compliance
@@ -2098,7 +2137,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
Write-PScriboMessage 'ESXi VUM compliance information is not currently available with your version of PowerShell.'
}
if ($VMHostCompliances) {
- Section -Style Heading5 'Update Manager Compliance' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Update Manager Compliance' {
$VMHostComplianceInfo = foreach ($VMHostCompliance in $VMHostCompliances) {
[PSCustomObject]@{
'Baseline' = $VMHostCompliance.Baseline.Name
@@ -2131,7 +2170,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region ESXi Host Comprehensive Information Section
if ($InfoLevel.VMHost -ge 5) {
#region ESXi Host Advanced System Settings
- Section -Style Heading5 'Advanced System Settings' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Advanced System Settings' {
$AdvSettings = $VMHost | Get-AdvancedSetting | Select-Object Name, Value
$TableParams = @{
Name = "Advanced System Settings - $VMHost"
@@ -2145,7 +2184,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion ESXi Host Advanced System Settings
#region ESXi Host Software VIBs
- Section -Style Heading5 'Software VIBs' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Software VIBs' {
$esxcli = Get-EsxCli -VMHost $VMHost -V2 -Server $vCenter
$VMHostVibs = $esxcli.software.vib.list.Invoke()
$VMHostVibs = foreach ($VMHostVib in $VMHostVibs) {
@@ -2180,7 +2219,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region ESXi Host Datastore Specifications
$VMHostDatastores = $VMHost | Get-Datastore | Where-Object { ($_.State -eq 'Available') -and ($_.CapacityGB -gt 0) } | Sort-Object Name
if ($VMHostDatastores) {
- Section -Style Heading5 'Datastores' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Datastores' {
$VMHostDsSpecs = foreach ($VMHostDatastore in $VMHostDatastores) {
[PSCustomObject]@{
'Datastore' = $VMHostDatastore.Name
@@ -2216,13 +2255,13 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$VMHostHbas = $VMHost | Get-VMHostHba | Sort-Object Device
if ($VMHostHbas) {
#region ESXi Host Storage Adapters Section
- Section -Style Heading5 'Storage Adapters' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Storage Adapters' {
Paragraph "The following section details the storage adapter configuration for $VMHost."
foreach ($VMHostHba in $VMHostHbas) {
$Target = ((Get-View $VMHostHba.VMhost).Config.StorageDevice.ScsiTopology.Adapter | Where-Object { $_.Adapter -eq $VMHostHba.Key }).Target
$LUNs = Get-ScsiLun -Hba $VMHostHba -LunType "disk" -ErrorAction SilentlyContinue
- $Paths = ($Target | foreach { $_.Lun.Count } | Measure-Object -Sum)
- Section -Style Heading5 "$($VMHostHba.Device)" {
+ $Paths = ($Target | ForEach-Object { $_.Lun.Count } | Measure-Object -Sum)
+ Section -Style NOTOCHeading5 -ExcludeFromTOC "$($VMHostHba.Device)" {
$VMHostStorageAdapter = [PSCustomObject]@{
'Adapter' = $VMHostHba.Device
'Type' = Switch ($VMHostHba.Type) {
@@ -2363,7 +2402,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion ESXi Host Network Configuration
#region ESXi Host Physical Adapters
- Section -Style Heading5 'Physical Adapters' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Physical Adapters' {
Paragraph "The following section details the physical network adapter configuration for $VMHost."
$PhysicalNetAdapters = $VMHost.ExtensionData.Config.Network.Pnic | Sort-Object Device
$VMHostPhysicalNetAdapters = foreach ($PhysicalNetAdapter in $PhysicalNetAdapters) {
@@ -2415,7 +2454,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
}
if ($InfoLevel.VMHost -ge 4) {
foreach ($VMHostPhysicalNetAdapter in $VMHostPhysicalNetAdapters) {
- Section -Style Heading5 "$($VMHostPhysicalNetAdapter.Adapter)" {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC "$($VMHostPhysicalNetAdapter.Adapter)" {
$TableParams = @{
Name = "Physical Adapter $($VMHostPhysicalNetAdapter.Adapter) - $VMHost"
List = $true
@@ -2444,11 +2483,11 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region ESXi Host Cisco Discovery Protocol
$VMHostNetworkAdapterCDP = $VMHost | Get-VMHostNetworkAdapterDP | Where-Object { $_.Status -eq 'Connected' } | Sort-Object Device
if ($VMHostNetworkAdapterCDP) {
- Section -Style Heading5 'Cisco Discovery Protocol' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Cisco Discovery Protocol' {
Paragraph "The following section details the CDP information for $VMHost."
if ($InfoLevel.VMHost -ge 4) {
foreach ($VMHostNetworkAdapter in $VMHostNetworkAdapterCDP) {
- Section -Style Heading5 "$($VMHostNetworkAdapter.Device)" {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC "$($VMHostNetworkAdapter.Device)" {
$VMHostCDP = [PSCustomObject]@{
'Status' = $VMHostNetworkAdapter.Status
'System Name' = $VMHostNetworkAdapter.SystemName
@@ -2500,11 +2539,11 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region ESXi Host Link Layer Discovery Protocol
$VMHostNetworkAdapterLLDP = $VMHost | Get-VMHostNetworkAdapterDP | Where-Object { $null -ne $_.ChassisId } | Sort-Object Device
if ($VMHostNetworkAdapterLLDP) {
- Section -Style Heading5 'Link Layer Discovery Protocol' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Link Layer Discovery Protocol' {
Paragraph "The following section details the LLDP information for $VMHost."
if ($InfoLevel.VMHost -ge 4) {
foreach ($VMHostNetworkAdapter in $VMHostNetworkAdapterLLDP) {
- Section -Style Heading5 "$($VMHostNetworkAdapter.Device)" {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC "$($VMHostNetworkAdapter.Device)" {
$VMHostLLDP = [PSCustomObject]@{
'Chassis ID' = $VMHostNetworkAdapter.ChassisId
'Port ID' = $VMHostNetworkAdapter.PortId
@@ -2553,7 +2592,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion ESXi Host Link Layer Discovery Protocol
#region ESXi Host VMkernel Adapaters
- Section -Style Heading5 'VMkernel Adapters' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'VMkernel Adapters' {
Paragraph "The following section details the VMkernel adapter configuration for $VMHost"
$VMkernelAdapters = $VMHost | Get-View | ForEach-Object -Process {
$esx = $_
@@ -2655,7 +2694,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
}
}
foreach ($VMkernelAdapter in ($VMkernelAdapters | Sort-Object 'Adapter')) {
- Section -Style Heading5 "$($VMkernelAdapter.Adapter)" {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC "$($VMkernelAdapter.Adapter)" {
$TableParams = @{
Name = "VMkernel Adapter $($VMkernelAdapter.Adapter) - $VMHost"
List = $true
@@ -2674,7 +2713,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$VSSwitches = $VMHost | Get-VirtualSwitch -Standard | Sort-Object Name
if ($VSSwitches) {
#region Section Standard Virtual Switches
- Section -Style Heading5 'Standard Virtual Switches' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Standard Virtual Switches' {
Paragraph "The following section details the standard virtual switch configuration for $VMHost."
BlankLine
$VSSwitchNicTeaming = $VSSwitches | Get-NicTeamingPolicy
@@ -2701,7 +2740,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$VssSecurity = $VSSwitches | Get-SecurityPolicy
if ($VssSecurity) {
#region Virtual Switch Security Policy
- Section -Style Heading5 'Virtual Switch Security' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Virtual Switch Security' {
$VssSecurity = foreach ($VssSec in $VssSecurity) {
[PSCustomObject]@{
'Virtual Switch' = $VssSec.VirtualSwitch
@@ -2733,7 +2772,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion ESXi Host Virtual Switch Security Policy
#region ESXi Host Virtual Switch Traffic Shaping Policy
- Section -Style Heading5 'Virtual Switch Traffic Shaping' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Virtual Switch Traffic Shaping' {
$VssTrafficShapingPolicy = foreach ($VSSwitch in $VSSwitches) {
[PSCustomObject]@{
'Virtual Switch' = $VSSwitch.Name
@@ -2761,7 +2800,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$VssNicTeamingPolicy = $VSSwitches | Get-NicTeamingPolicy
if ($VssNicTeamingPolicy) {
#region Virtual Switch Teaming & Failover Section
- Section -Style Heading5 'Virtual Switch Teaming & Failover' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Virtual Switch Teaming & Failover' {
$VssNicTeaming = foreach ($VssNicTeam in $VssNicTeamingPolicy) {
[PSCustomObject]@{
'Virtual Switch' = $VssNicTeam.VirtualSwitch
@@ -2806,7 +2845,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region ESXi Host Virtual Switch Port Groups
$VssPortgroups = $VSSwitches | Get-VirtualPortGroup -Standard
if ($VssPortgroups) {
- Section -Style Heading5 'Virtual Switch Port Groups' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Virtual Switch Port Groups' {
$VssPortgroups = foreach ($VssPortgroup in $VssPortgroups) {
[PSCustomObject]@{
'Port Group' = $VssPortgroup.Name
@@ -2830,7 +2869,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$VssPortgroupSecurity = $VSSwitches | Get-VirtualPortGroup | Get-SecurityPolicy
if ($VssPortgroupSecurity) {
#region Virtual Port Group Security Policy Section
- Section -Style Heading5 'Virtual Switch Port Group Security' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Virtual Switch Port Group Security' {
$VssPortgroupSecurity = foreach ($VssPortgroupSec in $VssPortgroupSecurity) {
[PSCustomObject]@{
'Port Group' = $VssPortgroupSec.VirtualPortGroup
@@ -2863,7 +2902,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion ESXi Host Virtual Switch Port Group Security Policy
#region ESXi Host Virtual Switch Port Group Traffic Shaping Policy
- Section -Style Heading5 'Virtual Switch Port Group Traffic Shaping' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Virtual Switch Port Group Traffic Shaping' {
$VssPortgroupTrafficShapingPolicy = foreach ($VssPortgroup in $VssPortgroups) {
[PSCustomObject]@{
'Port Group' = $VssPortgroup.Name
@@ -2893,7 +2932,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$VssPortgroupNicTeaming = $VSSwitches | Get-VirtualPortGroup | Get-NicTeamingPolicy
if ($VssPortgroupNicTeaming) {
#region Virtual Switch Port Group Teaming & Failover Section
- Section -Style Heading5 'Virtual Switch Port Group Teaming & Failover' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Virtual Switch Port Group Teaming & Failover' {
$VssPortgroupNicTeaming = foreach ($VssPortgroupNicTeam in $VssPortgroupNicTeaming) {
[PSCustomObject]@{
'Port Group' = $VssPortgroupNicTeam.VirtualPortGroup
@@ -2948,7 +2987,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
Paragraph "The following section details the host security configuration for $VMHost."
#region ESXi Host Lockdown Mode
if ($null -ne $VMHost.ExtensionData.Config.LockdownMode) {
- Section -Style Heading5 'Lockdown Mode' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Lockdown Mode' {
$LockdownMode = [PSCustomObject]@{
'Lockdown Mode' = Switch ($VMHost.ExtensionData.Config.LockdownMode) {
'lockdownDisabled' { 'Disabled' }
@@ -2974,7 +3013,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#endregion ESXi Host Lockdown Mode
#region ESXi Host Services
- Section -Style Heading5 'Services' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Services' {
$VMHostServices = $VMHost | Get-VMHostService
$Services = foreach ($VMHostService in $VMHostServices) {
[PSCustomObject]@{
@@ -3020,7 +3059,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$VMHostFirewallExceptions = $VMHost | Get-VMHostFirewallException
if ($VMHostFirewallExceptions) {
#region Friewall Section
- Section -Style Heading5 'Firewall' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Firewall' {
$VMHostFirewall = foreach ($VMHostFirewallException in $VMHostFirewallExceptions) {
[PScustomObject]@{
'Service' = $VMHostFirewallException.Name
@@ -3055,7 +3094,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region ESXi Host Authentication
$AuthServices = $VMHost | Get-VMHostAuthentication
if ($AuthServices.DomainMembershipStatus) {
- Section -Style Heading5 'Authentication Services' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'Authentication Services' {
$AuthServices = $AuthServices | Select-Object Domain, @{L = 'Domain Membership'; E = { $_.DomainMembershipStatus } }, @{L = 'Trusted Domains'; E = { $_.TrustedDomains } }
$TableParams = @{
Name = "Authentication Services - $VMHost"
@@ -3130,7 +3169,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$VMStartPolicy = $VMHost | Get-VMStartPolicy | Where-Object { $_.StartAction -ne 'None' }
if ($VMStartPolicy) {
#region VM Startup/Shutdown Section
- Section -Style Heading5 'VM Startup/Shutdown' {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC 'VM Startup/Shutdown' {
$VMStartPolicies = foreach ($VMStartPol in $VMStartPolicy) {
[PSCustomObject]@{
'Start Order' = $VMStartPol.StartOrder
@@ -3405,7 +3444,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region Distributed Switch Port Group Security
$VDSPortgroupSecurity = $VDS | Get-VDPortgroup | Get-VDSecurityPolicy
if ($VDSPortgroupSecurity) {
- Section -Style Heading5 "Distributed Switch Port Group Security" {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC "Distributed Switch Port Group Security" {
$VDSSecurityPolicies = foreach ($VDSSecurityPolicy in $VDSPortgroupSecurity) {
[PSCustomObject]@{
'Port Group' = $VDSSecurityPolicy.VDPortgroup
@@ -3443,7 +3482,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$VDSPortgroupTrafficShaping += $VDSPortgroupTrafficShapingIn
$VDSPortgroupTrafficShaping += $VDSPortgroupTrafficShapingOut
if ($VDSPortgroupTrafficShaping) {
- Section -Style Heading5 "Distributed Switch Port Group Traffic Shaping" {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC "Distributed Switch Port Group Traffic Shaping" {
$VDSPortgroupTrafficShapingDetail = foreach ($VDSPortgroupTrafficShape in $VDSPortgroupTrafficShaping) {
[PSCustomObject]@{
'Port Group' = $VDSPortgroupTrafficShape.VDPortgroup
@@ -3474,7 +3513,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
#region Distributed Switch Port Group Teaming & Failover
$VDUplinkTeamingPolicy = $VDS | Get-VDPortgroup | Get-VDUplinkTeamingPolicy
if ($VDUplinkTeamingPolicy) {
- Section -Style Heading5 "Distributed Switch Port Group Teaming & Failover" {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC "Distributed Switch Port Group Teaming & Failover" {
$VDSPortgroupNICTeaming = foreach ($VDUplink in $VDUplinkTeamingPolicy) {
[PSCustomObject]@{
'Port Group' = $VDUplink.VDPortgroup
@@ -3707,7 +3746,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
if ($InfoLevel.vSAN -ge 4) {
$vDisks | Sort-Object Host | ForEach-Object {
- Section -Style Heading4 "$($_.Disk) - $($_.Host)" {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC "$($_.Disk) - $($_.Host)" {
$TableParams = @{
Name = "Disk $($_.Disk) - $($_.Host)"
List = $true
@@ -4505,7 +4544,7 @@ function Invoke-AsBuiltReport.VMware.vSphere {
$VMHardDiskInfo | Table @TableParams
} else {
foreach ($VMHdd in $VMHdds) {
- Section -Style Heading5 "$($VMHdd.Name)" {
+ Section -Style NOTOCHeading5 -ExcludeFromTOC "$($VMHdd.Name)" {
$SCSIDevice = $VMView.Config.Hardware.Device | Where-Object { $_.Key -eq $VMHdd.ExtensionData.Key -and $_.Backing.FileName -eq $VMHdd.FileName }
$SCSIController = $SCSIControllers | Where-Object { $SCSIDevice.ControllerKey -eq $_.Key }
$VMHardDiskInfo = [PSCustomObject]@{