diff --git a/.github/workflows/Codeql.yml b/.github/workflows/Codeql.yml index cadfeb5..d826105 100644 --- a/.github/workflows/Codeql.yml +++ b/.github/workflows/Codeql.yml @@ -27,7 +27,7 @@ jobs: name: PSScriptAnalyzer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Run PSScriptAnalyzer uses: microsoft/psscriptanalyzer-action@v1.1 diff --git a/.github/workflows/PSScriptAnalyzer.yml b/.github/workflows/PSScriptAnalyzer.yml index 528cc2a..ef8806c 100644 --- a/.github/workflows/PSScriptAnalyzer.yml +++ b/.github/workflows/PSScriptAnalyzer.yml @@ -5,7 +5,7 @@ jobs: name: Run PSScriptAnalyzer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: lint uses: devblackops/github-action-psscriptanalyzer@master with: diff --git a/.github/workflows/PSScriptAnalyzerSettings.psd1 b/.github/workflows/PSScriptAnalyzerSettings.psd1 index 24835e7..185edd8 100644 --- a/.github/workflows/PSScriptAnalyzerSettings.psd1 +++ b/.github/workflows/PSScriptAnalyzerSettings.psd1 @@ -3,6 +3,7 @@ 'PSUseToExportFieldsInManifest', 'PSReviewUnusedParameter', 'PSUseDeclaredVarsMoreThanAssignments', - 'PSAvoidGlobalVars' + 'PSAvoidGlobalVars', + 'PSAvoidUsingWriteHost' ) } \ No newline at end of file diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index ccddc65..c79e31e 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -6,9 +6,9 @@ on: jobs: publish-to-gallery: - runs-on: windows-2019 + runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set PSRepository to Trusted for PowerShell Gallery shell: pwsh run: | @@ -17,6 +17,10 @@ jobs: shell: pwsh run: | Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force + - name: Install Diagrammer.Core module + shell: pwsh + run: | + Install-Module -Name Diagrammer.Core -Repository PSGallery -Force - name: Test Module Manifest shell: pwsh run: | @@ -45,7 +49,7 @@ jobs: needs: publish-to-gallery runs-on: ubuntu-latest steps: - - uses: zentered/bluesky-post-action@v0.1.0 + - uses: zentered/bluesky-post-action@v0.3.0 with: post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Omnissa #VMware #Horizon #vExpert #AsBuiltReport #PowerShell" env: diff --git a/AsBuiltReport.VMware.Horizon.json b/AsBuiltReport.VMware.Horizon.json index c9cc70a..0c5c1a3 100644 --- a/AsBuiltReport.VMware.Horizon.json +++ b/AsBuiltReport.VMware.Horizon.json @@ -8,7 +8,23 @@ "ShowHeaderFooter": true, "ShowTableCaptions": true }, - "Options": {}, + "Options": { + "EnableDiagrams": false, + "EnableDiagramDebug": false, + "DiagramColumnSize": 3, + "DiagramTheme": "White", + "DiagramWaterMark": "", + "DiagramType": { + "Infrastructure": true + }, + "ExportDiagrams": false, + "ExportDiagramsFormat": [ + "png" + ], + "EnableDiagramSignature": false, + "SignatureAuthorName": "", + "SignatureCompanyName": "" + }, "InfoLevel": { "_comment_": "0 = Disabled, 1 = Summary, 2 = Informative, 3 = Detailed", "UsersAndGroups": { diff --git a/AsBuiltReport.VMware.Horizon.psd1 b/AsBuiltReport.VMware.Horizon.psd1 index 8265423..2e269c5 100644 --- a/AsBuiltReport.VMware.Horizon.psd1 +++ b/AsBuiltReport.VMware.Horizon.psd1 @@ -12,7 +12,7 @@ RootModule = 'AsBuiltReport.VMware.Horizon.psm1' # Version number of this module. - ModuleVersion = '1.1.5' + ModuleVersion = '1.1.6' # Supported PSEditions # CompatiblePSEditions = @() @@ -54,7 +54,11 @@ RequiredModules = @( @{ ModuleName = 'AsBuiltReport.Core'; - ModuleVersion = '1.4.2' + ModuleVersion = '1.4.3' + } + @{ + ModuleName = 'Diagrammer.Core'; + ModuleVersion = '0.2.29' } ) # Assemblies that must be loaded prior to importing this module diff --git a/CHANGELOG.md b/CHANGELOG.md index 612df69..b5b03bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,30 @@ 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.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.1.5] - 2025-1-21 +## [1.1.6] - 2025-09-13 + +### Added + +- Include Diagrammer.Core module as a requirement. +- Introduce the necessary file structure to enable diagram generation. + +### Changed + +- Update AsBuiltReport.Core module requirement to v1.4.3. +- Upgrade actions/checkout to v5 in Codeql.yml and PSScriptAnalyzer.yml. +- Upgrade actions/bluesky-post-action to v0.3.0 +- Modifie Release.yml to use windows-latest. +- Enhance Invoke-ASBuiltReport function with improved dependency version checks. +- Update CHANGELOG.md to reflect recent changes. +- This is the final release supporting VMware Horizon; future versions will support Omnissa only. + +## [1.1.5.1] - 2025-03-13 + +### Fixed + +- Fix `Get-RequiredModule` script function to properly check for installed VMware PowerCLI versions ([Fix #36](https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues/36)) + +## [1.1.5] - 2025-01-21 ### Added diff --git a/Src/Private/Export-AbrDiagram.ps1 b/Src/Private/Export-AbrDiagram.ps1 new file mode 100644 index 0000000..3cc3fe1 --- /dev/null +++ b/Src/Private/Export-AbrDiagram.ps1 @@ -0,0 +1,133 @@ +function Export-AbrDiagram { + <# + .SYNOPSIS + Function used to build the settings needed to call Export-Diagrammer (Diagrammer.Core) + + .DESCRIPTION + The Export-AbrDiagram function build the settings needed to call Export-Diagrammer (Diagrammer.Core) + to export a diagram in PDF, PNG, SVG, or base64 formats using PSgraph. + .NOTES + Version: 0.1.1 + Author: AsBuiltReport Organization + Twitter: @AsBuiltReport + Github: AsBuiltReport + + .LINK + https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon + #> + + # Don't remove this line (Don't touch it!) + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingCmdletAliases", "", Scope = "Function")] + + [CmdletBinding()] + param ( + $DiagramObject, + [string] $MainDiagramLabel = 'Change Me', + [Parameter(Mandatory = $true)] + [string] $FileName, + [string] $Orientation = 'Portrait' + ) + + begin { + Write-PScriboMessage -Message "EnableDiagrams set to $($Options.EnableDiagrams)." + } + + process { + if ($Options.EnableDiagrams) { + Write-PScriboMessage -Message "Loading export diagram settings" + + $RootPath = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent + [System.IO.FileInfo]$IconPath = Join-Path -Path $RootPath -ChildPath 'icons' + + $DiagramParams = @{ + 'FileName' = $FileName + 'OutputFolderPath' = $OutputFolderPath + 'MainDiagramLabel' = $MainDiagramLabel + 'MainDiagramLabelFontsize' = 28 + 'MainDiagramLabelFontcolor' = '#565656' + 'MainDiagramLabelFontname' = 'Segoe UI Black' + 'IconPath' = $IconPath + 'ImagesObj' = $Images + 'LogoName' = 'AsBuiltReport_LOGO' + 'SignatureLogoName' = 'AsBuiltReport_Signature' + 'WaterMarkText' = $Options.DiagramWaterMark + 'Direction' = 'top-to-bottom' + } + + if ($Options.DiagramTheme -eq 'Black') { + $DiagramParams.add('MainGraphBGColor', 'Black') + $DiagramParams.add('Edgecolor', 'White') + $DiagramParams.add('Fontcolor', 'White') + $DiagramParams.add('NodeFontcolor', 'White') + $DiagramParams.add('WaterMarkColor', 'White') + } elseif ($Options.DiagramTheme -eq 'Neon') { + $DiagramParams.add('MainGraphBGColor', 'grey14') + $DiagramParams.add('Edgecolor', 'gold2') + $DiagramParams.add('Fontcolor', 'gold2') + $DiagramParams.add('NodeFontcolor', 'gold2') + $DiagramParams.add('WaterMarkColor', '#FFD700') + } else { + $DiagramParams.add('WaterMarkColor', '#333333') + } + + if ($Options.ExportDiagrams) { + if (-not $Options.ExportDiagramsFormat) { + $DiagramFormat = 'png' + } else { + $DiagramFormat = $Options.ExportDiagramsFormat + } + $DiagramParams.Add('Format', $DiagramFormat) + } else { + $DiagramParams.Add('Format', "base64") + } + + if ($Options.EnableDiagramDebug) { + + $DiagramParams.Add('DraftMode', $True) + + } + + if ($Options.EnableDiagramSignature) { + $DiagramParams.Add('Signature', $True) + $DiagramParams.Add('AuthorName', $Options.SignatureAuthorName) + $DiagramParams.Add('CompanyName', $Options.SignatureCompanyName) + } + + if ($Options.ExportDiagrams) { + try { + Write-PScriboMessage -Message "Generating $MainDiagramLabel diagram" + $Graph = $DiagramObject + if ($Graph) { + Write-PScriboMessage -Message "Saving $MainDiagramLabel diagram" + $Diagram = New-Diagrammer @DiagramParams -InputObject $Graph + if ($Diagram) { + foreach ($OutputFormat in $DiagramFormat) { + Write-Information -MessageData "Saved '$($FileName).$($OutputFormat)' diagram to '$($OutputFolderPath)'." -InformationAction Continue + } + } + } + } catch { + Write-PScriboMessage -IsWarning -Message "Unable to export the $MainDiagramLabel Diagram: $($_.Exception.Message)" + } + } + try { + $DiagramParams.Remove('Format') + $DiagramParams.Add('Format', "base64") + + $Graph = $DiagramObject + $Diagram = New-Diagrammer @DiagramParams -InputObject $Graph + if ($Diagram) { + if ((Get-DiaImagePercent -GraphObj $Diagram).Width -gt 600) { $ImagePrty = 30 } else { $ImagePrty = 50 } + Section -Style Heading2 $MainDiagramLabel -Orientation $Orientation { + Image -Base64 $Diagram -Text "$MainDiagramLabel" -Percent $ImagePrty -Align Center + Paragraph "Image preview: Opens the image in a new tab to view it at full resolution." -Tabs 2 + } + } + } catch { + Write-PScriboMessage -IsWarning -Message "Unable to generate the $MainDiagramLabel Diagram: $($_.Exception.Message)" + } + } + } + + end {} +} \ No newline at end of file diff --git a/Src/Private/Get-AbrHRZInfrastructureDiagram.ps1 b/Src/Private/Get-AbrHRZInfrastructureDiagram.ps1 new file mode 100644 index 0000000..70b736b --- /dev/null +++ b/Src/Private/Get-AbrHRZInfrastructureDiagram.ps1 @@ -0,0 +1,61 @@ +function Get-AbrVmmInfrastructureDiagram { + <# + .SYNOPSIS + Used by As Built Report to built VMM infrastructure diagram + .DESCRIPTION + + .NOTES + Version: 0.1.1 + Author: AsBuiltReport Organization + Twitter: @AsBuiltReport + Github: AsBuiltReport + .EXAMPLE + + .LINK + + #> + [CmdletBinding()] + param ( + ) + + begin { + Write-PScriboMessage "Generating Infrastructure Diagram for Horizon." + # Used for DraftMode (Don't touch it!) + if ($Options.EnableDiagramDebug) { + $EdgeDebug = @{style = 'filled'; color = 'red' } + $SubGraphDebug = @{style = 'dashed'; color = 'red' } + $NodeDebug = @{color = 'black'; style = 'red'; shape = 'plain' } + $NodeDebugEdge = @{color = 'black'; style = 'red'; shape = 'plain' } + $IconDebug = $true + } else { + $EdgeDebug = @{style = 'invis'; color = 'red' } + $SubGraphDebug = @{style = 'invis'; color = 'gray' } + $NodeDebug = @{color = 'transparent'; style = 'transparent'; shape = 'point' } + $NodeDebugEdge = @{color = 'transparent'; style = 'transparent'; shape = 'none' } + $IconDebug = $false + } + + # Used for setting diagram Theme (Can be change to fits your needs!) + if ($Options.DiagramTheme -eq 'Black') { + $Edgecolor = 'White' + $Fontcolor = 'White' + } elseif ($Options.DiagramTheme -eq 'Neon') { + $Edgecolor = 'gold2' + $Fontcolor = 'gold2' + } else { + $Edgecolor = '#71797E' + $Fontcolor = '#565656' + } + } + + process { + try { + + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message + } + } + + end {} + +} \ No newline at end of file diff --git a/Src/Private/Get-RequiredModule.ps1 b/Src/Private/Get-RequiredModule.ps1 index 9e814a5..c1e464e 100644 --- a/Src/Private/Get-RequiredModule.ps1 +++ b/Src/Private/Get-RequiredModule.ps1 @@ -4,33 +4,53 @@ function Get-RequiredModule { Function to check if the required version of VMware PowerCLI is installed .DESCRIPTION Function to check if the required version of VMware PowerCLI is installed + .NOTES + Version: 0.1.1 + Author: Tim Carman + Twitter: @tpcarman + Github: tpcarman .PARAMETER Name The name of the required PowerShell module .PARAMETER Version The version of the required PowerShell module #> [CmdletBinding()] - - Param - ( + param ( + [CmdletBinding()] [Parameter(Mandatory = $true, ValueFromPipeline = $false)] [ValidateNotNullOrEmpty()] - [String] $Name, + [String]$Name, + [CmdletBinding()] [Parameter(Mandatory = $true, ValueFromPipeline = $false)] [ValidateNotNullOrEmpty()] - [String] $Version + [String]$Version ) + + begin {} + process { - # Check if the required version of VMware PowerCLI is installed - $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 Horizon As Built Report. Run 'Install-Module -Name $Name -MinimumVersion $Version' to install the required modules." + # Convert required version to a [Version] object + $RequiredVersion = [Version]$Version + + # Find the latest installed version of the module + $InstalledModule = Get-Module -ListAvailable -Name $Name | + Sort-Object -Property Version -Descending | + Select-Object -First 1 + + if ($null -eq $InstalledModule) { + throw "VMware PowerCLI $Version or higher is required. 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 Horizon As Built Report. Run 'Update-Module -Name $Name -MinimumVersion $Version' to update the required modules." + + # Convert installed version to a [Version] object + $InstalledVersion = [Version]$InstalledModule.Version + + Write-Host "- $($InstalledModule.Name) $InstalledVersion is currently installed." + + if ($InstalledVersion -lt $RequiredVersion) { + throw "VMware PowerCLI $Version or higher is required. Run 'Update-Module -Name $Name -MinimumVersion $Version -Force' to update the required modules." } } + end {} -} +} \ No newline at end of file diff --git a/Src/Public/Invoke-ASBuiltReport.VMware.Horizon.ps1 b/Src/Public/Invoke-ASBuiltReport.VMware.Horizon.ps1 index 8b22d35..35428ed 100644 --- a/Src/Public/Invoke-ASBuiltReport.VMware.Horizon.ps1 +++ b/Src/Public/Invoke-ASBuiltReport.VMware.Horizon.ps1 @@ -5,7 +5,7 @@ .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.5.1 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -18,6 +18,11 @@ https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon #> + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "", Scope = "Function")] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams", "", Scope = "Function")] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingPlainTextForPassword", "", Scope = "Function")] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "", Scope = "Function")] + param ( [String[]] $Target, [PSCredential] $Credential @@ -28,25 +33,30 @@ break } - Write-PScriboMessage -Plugin "Module" -IsWarning "Please refer to the AsBuiltReport.VMware.Horizon github website for more detailed information about this project." - Write-PScriboMessage -Plugin "Module" -IsWarning "Do not forget to update your report configuration file after each new version release." - Write-PScriboMessage -Plugin "Module" -IsWarning "Documentation: https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon" - Write-PScriboMessage -Plugin "Module" -IsWarning "Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues" - Write-PScriboMessage -Plugin "Module" -IsWarning "This project is community maintained and has no sponsorship from VMware/Omnissa, its employees or any of its affiliates." - - Try { - $InstalledVersion = Get-Module -ListAvailable -Name AsBuiltReport.VMware.Horizon -ErrorAction SilentlyContinue | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version - - if ($InstalledVersion) { - Write-PScriboMessage -IsWarning "AsBuiltReport.VMware.Horizon $($InstalledVersion.ToString()) is currently installed." - $LatestVersion = Find-Module -Name AsBuiltReport.VMware.Horizon -Repository PSGallery -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version - if ($LatestVersion -gt $InstalledVersion) { - Write-PScriboMessage -IsWarning "AsBuiltReport.VMware.Horizon $($LatestVersion.ToString()) is available." - Write-PScriboMessage -IsWarning "Run 'Update-Module -Name AsBuiltReport.VMware.Horizon -Force' to install the latest version." + Write-Host "- Please refer to the AsBuiltReport.VMware.Horizon github website for more detailed information about this project." + Write-Host "- Do not forget to update your report configuration file after each new version release." + Write-Host "- Documentation: https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon" + Write-Host "- Issues or bug reporting: https://github.com/AsBuiltReport/AsBuiltReport.VMware.Horizon/issues" + Write-Host "- This project is community maintained and has no sponsorship from VMware, its employees or any of its affiliates." + + # Check the version of the dependency modules + $ModuleArray = @('AsBuiltReport.VMware.Horizon', 'Diagrammer.Core') + + foreach ($Module in $ModuleArray) { + try { + $InstalledVersion = Get-Module -ListAvailable -Name $Module -ErrorAction SilentlyContinue | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version + + if ($InstalledVersion) { + Write-Host "- $Module module v$($InstalledVersion.ToString()) is currently installed." + $LatestVersion = Find-Module -Name $Module -Repository PSGallery -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Version + if ($InstalledVersion -lt $LatestVersion) { + Write-Host " - $Module module v$($LatestVersion.ToString()) is available." -ForegroundColor Red + Write-Host " - Run 'Update-Module -Name $Module -Force' to install the latest version." -ForegroundColor Red + } } + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message } - } Catch { - Write-PScriboMessage -IsWarning $_.Exception.Message } # Check if the required version of VMware PowerCLI is installed @@ -61,9 +71,24 @@ foreach ($HVEnvironment in $Target) { - Try { + if (Select-String -InputObject $HVEnvironment -Pattern "^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$") { + throw "Please use the FQDN instead of an IP address to connect to the Backup Server: $HVEnvironment" + } + + # Variable translating Icon to Image Path ($IconPath) + $script:Images = @{ + "AsBuiltReport_LOGO" = "AsBuiltReport_Logo.png" + "AsBuiltReport_Signature" = "AsBuiltReport_Signature.png" + "Abr_LOGO_Footer" = "AsBuiltReport_Signature.png" + "Microsoft_Logo" = "Microsoft_Logo.png" + "Server" = "server.png" + "DB_Server" = "DB_Server.png" + } + $script:ColumnSize = $Options.DiagramColumnSize + + try { $HvServer = Connect-HVServer -Server $HVEnvironment -Credential $Credential -ErrorAction Stop - } Catch { + } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -101,10 +126,10 @@ $ConnectionServersHealth = try { $hzServices.ConnectionServerHealth.ConnectionServerHealth_List() } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } # TrueSSO - $CertificateSSOconnectorHealthlist = try { $hzServices.CertificateSSOConnectorHealth.CertificateSSOConnectorHealth_list()} catch { Write-PScriboMessage -IsWarning $_.Exception.Message } + $CertificateSSOconnectorHealthlist = try { $hzServices.CertificateSSOConnectorHealth.CertificateSSOConnectorHealth_list() } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } # SAML SSO - $SAMLAuthenticatorhealthlist=$hzServices.SAMLAuthenticatorHealth.SAMLAuthenticatorHealth_list() + $SAMLAuthenticatorhealthlist = $hzServices.SAMLAuthenticatorHealth.SAMLAuthenticatorHealth_list() # Pod Health @@ -136,7 +161,7 @@ # Sites $CloudPodSites = try { $hzServices.Site.Site_List() } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } $CloudPodLists = try { $hzServices.Pod.Pod_List() } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } - $CloudPodListsLocal = try { $hzServices.Pod.Pod_List() | Where-Object {$_.localpod -eq $false} } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } + $CloudPodListsLocal = try { $hzServices.Pod.Pod_List() | Where-Object { $_.localpod -eq $false } } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } # Event Database Info $EventDataBases = try { $hzServices.EventDatabase.EventDatabase_Get() } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -340,7 +365,7 @@ } # Registerd Physical Machines - Try { + try { $RegisteredPhysicalMachineInfoQueryDefn = New-Object VMware.Hv.QueryDefinition $RegisteredPhysicalMachineInfoQueryDefn.queryentitytype = 'RegisteredPhysicalMachineInfo' $RegisteredPhysicalMachineResults = $Queryservice.QueryService_Create($hzServices, $RegisteredPhysicalMachineInfoQueryDefn) @@ -381,6 +406,15 @@ Write-PScriboMessage -IsWarning $_.Exception.Message } Section -Style Heading1 "$($HVEnvironment.toUpper())" { + if ($Options.EnableDiagrams) { + $HRZDiagram = Get-AbrHRZInfrastructureDiagram + if ($HRZDiagram) { + Export-AbrDiagram -DiagramObject $HRZDiagram -MainDiagramLabel "Horizon Infrastructure Diagram" -FileName "AsBuiltReport.VMware.Horizon.Infrastructure" + } else { + Write-PScriboMessage -IsWarning "Unable to generate the Infrastructure Diagram." + } + } + Get-AbrHRZInfrastructure } @@ -471,7 +505,7 @@ Get-AbrHRZHCLicenseService } } - if ($healthcheck.RemotePod.RemotePod -and $CloudPodListsLocal){ + if ($healthcheck.RemotePod.RemotePod -and $CloudPodListsLocal) { Section -Style Heading2 'Remote Pod' { Get-AbrHRZHCRemotePod } diff --git a/icons/AsBuiltReport_Logo.png b/icons/AsBuiltReport_Logo.png new file mode 100644 index 0000000..ff8a542 Binary files /dev/null and b/icons/AsBuiltReport_Logo.png differ diff --git a/icons/AsBuiltReport_Signature.png b/icons/AsBuiltReport_Signature.png new file mode 100644 index 0000000..000cde6 Binary files /dev/null and b/icons/AsBuiltReport_Signature.png differ diff --git a/icons/no_icon.png b/icons/no_icon.png new file mode 100644 index 0000000..c5b0563 Binary files /dev/null and b/icons/no_icon.png differ