diff --git a/AsBuiltReport.VMware.vSphere.psd1 b/AsBuiltReport.VMware.vSphere.psd1 index 0d9cadb..120d07f 100644 --- a/AsBuiltReport.VMware.vSphere.psd1 +++ b/AsBuiltReport.VMware.vSphere.psd1 @@ -27,7 +27,7 @@ # CompanyName = '' # Copyright statement for this module - Copyright = '(c) 2018 Tim Carman. All rights reserved.' + Copyright = '(c) 2024 Tim Carman. All rights reserved.' # Description of the functionality provided by this module Description = 'A PowerShell module to generate an as built report on the configuration of VMware vSphere.' @@ -111,7 +111,7 @@ ReleaseNotes = 'https://raw.githubusercontent.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/master/CHANGELOG.md' # Prerelease string of this module - Prerelease = 'rc1' + Prerelease = 'rc2' # 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 78e8f8e..a2d1ff1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,18 +1,25 @@ # :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 +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [[1.3.4-RC2](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/releases/tag/v1.3.4-RC2)] - 2024-02-21 ### 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 +- Update VMware PowerCLI requirements to version 13.2 ([Fix #107](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/107)) +- Improve bug and feature request templates (@rebelinux) +- Improve TOC structure +- Update 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)) +- Update 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)) +- Add 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)) +- Update vCenter Server alarms reporting ([Fix #106](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/106)) +- Fix issue with Platform Services Controller reporting ([Fix #103](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/103)) +- Fix NSX-T virtual switch network labels ([Fix #118](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/118)) +- Fix [#103](https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues/103) ### Removed - Removed reporting of vCenter Server OS type diff --git a/Src/Public/Invoke-AsBuiltReport.VMware.vSphere.ps1 b/Src/Public/Invoke-AsBuiltReport.VMware.vSphere.ps1 index b2945af..193aaaf 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.4-RC1 + Version: 1.3.4-RC2 Author: Tim Carman Twitter: @tpcarman Github: tpcarman @@ -19,6 +19,26 @@ function Invoke-AsBuiltReport.VMware.vSphere { [PSCredential] $Credential ) + Write-PScriboMessage -IsWarning "Please refer to www.asbuiltreport.com for more detailed information about this project." + Write-PScriboMessage -IsWarning "Do not forget to update your report configuration file after each new version release." + Write-PScriboMessage -IsWarning "Documentation: https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere" + Write-PScriboMessage -IsWarning "Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.VMware.vSphere/issues" + + # Check the current AsBuiltReport.VMware.vSphere module + Try { + $InstalledVersion = Get-Module -ListAvailable -Name AsBuiltReport.VMware.vSphere -ErrorAction SilentlyContinue | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version + + if ($InstalledVersion) { + Write-PScriboMessage -IsWarning "AsBuiltReport.VMware.vSphere $($InstalledVersion.ToString()) is currently installed." + $LatestVersion = Find-Module -Name AsBuiltReport.VMware.vSphere -Repository PSGallery -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version + if ($LatestVersion -gt $InstalledVersion) { + Write-PScriboMessage -IsWarning "AsBuiltReport.VMware.vSphere $($LatestVersion.ToString()) is available." + Write-PScriboMessage -IsWarning "Run 'Update-Module -Name AsBuiltReport.VMware.vSphere -Force' to install the latest version." + } + } + } Catch { + Write-PscriboMessage -IsWarning $_.Exception.Message + } # Check if the required version of VMware PowerCLI is installed Get-RequiredModule -Name 'VMware.PowerCLI' -Version '13.2' @@ -2595,7 +2615,7 @@ function Invoke-AsBuiltReport.VMware.vSphere { 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 = $_ + #$esx = $_ $netSys = Get-View -Id $_.ConfigManager.NetworkSystem $vnicMgr = Get-View -Id $_.ConfigManager.VirtualNicManager $netSys.NetworkInfo.Vnic | @@ -2606,17 +2626,22 @@ function Invoke-AsBuiltReport.VMware.vSphere { 'Network Label' = & { if ($_.Spec.Portgroup) { $script:pg = $_.Spec.Portgroup + $script:pg + } elseif ($_.Spec.DistributedVirtualPort.Portgroupkey) { + $script:pg = Get-View -ViewType DistributedVirtualPortgroup -Property Name, Key -Filter @{'Key' = "$($_.Spec.DistributedVirtualPort.PortgroupKey)" } | Select-Object -ExpandProperty Name + $script:pg } else { - $script:pg = Get-View -ViewType DistributedVirtualPortgroup -Property Name, Key -Filter @{'Key' = "$($_.Spec.DistributedVirtualPort.PortgroupKey)" } | - Select-Object -ExpandProperty Name + '--' } - $script:pg } 'Virtual Switch' = & { if ($_.Spec.Portgroup) { (Get-VirtualPortGroup -Standard -Name $script:pg -VMHost $VMHost).VirtualSwitchName - } else { + } elseif ($_.Spec.DistributedVirtualPort.Portgroupkey) { (Get-VDPortgroup -Name $script:pg).VDSwitch.Name | Select-Object -Unique + } else { + # Haven't figured out how to gather this yet! + '--' } } 'TCP/IP Stack' = Switch ($_.Spec.NetstackInstanceKey) {