diff --git a/AsBuiltReport.VMware.Horizon.psd1 b/AsBuiltReport.VMware.Horizon.psd1 index 2e269c5..eaa4421 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.6' + ModuleVersion = '1.1.7' # Supported PSEditions # CompatiblePSEditions = @() diff --git a/CHANGELOG.md b/CHANGELOG.md index b5b03bc..078d104 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ 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.7] - 2025-09-?? + +### Fixed + +- Fix health check references for consistency across scripts +- Fix section styles, migrate from NOTOCHeading5 to Heading5 for consistency in documentation +- Fix error "Item has already been added. Key in dictionary: 'List' Key being added: 'List'" +- Fix error "Cannot bind argument to parameter 'Name' because it is an empty string" + ## [1.1.6] - 2025-09-13 ### Added diff --git a/Src/Private/Get-AbrHRZADDomain.ps1 b/Src/Private/Get-AbrHRZADDomain.ps1 index 5984cd0..0a63b7d 100644 --- a/Src/Private/Get-AbrHRZADDomain.ps1 +++ b/Src/Private/Get-AbrHRZADDomain.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZADDomain { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -47,7 +47,7 @@ function Get-AbrHRZADDomain { Write-PScriboMessage -IsWarning $_.Exception.Message } } - if ($HealthCheck.DataStores.Status) { + if ($HealthCheck.vSphere.DataStores) { $OutObj | Where-Object { $_.'Status' -eq 'ERROR' } | Set-Style -Style Warning } $TableParams = @{ diff --git a/Src/Private/Get-AbrHRZAccessGroup.ps1 b/Src/Private/Get-AbrHRZAccessGroup.ps1 index 9c8a99e..237a8e8 100644 --- a/Src/Private/Get-AbrHRZAccessGroup.ps1 +++ b/Src/Private/Get-AbrHRZAccessGroup.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZAccessGroup { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -37,7 +37,7 @@ function Get-AbrHRZAccessGroup { $OutObj = @() $AccessGroupJoined = @() $AccessGroupJoined += $AccessGroups - $AccessGroupJoined += $AccessGroups.Children + if ($AccessGroups.Children) { $AccessGroupJoined += $AccessGroups.Children } foreach ($AccessGroup in $AccessGroupJoined) { Write-PScriboMessage "Discovered $($AccessGroup.base.Name) Access Groups Information." $inObj = [ordered] @{ @@ -63,56 +63,60 @@ function Get-AbrHRZAccessGroup { Section -Style Heading4 "Access Groups Details" { $AccessGroupJoined = @() $AccessGroupJoined += $AccessGroups - $AccessGroupJoined += $AccessGroups.Children + if ($AccessGroups.Children) { $AccessGroupJoined += $AccessGroups.Children } foreach ($AccessGroup in $AccessGroupJoined) { - Write-PScriboMessage "Discovered $($AccessGroup.base.Name) Access Groups Detailed Information." - $AdministratorIDNameResults = @() - # Find Administrator ID Name - foreach ($AccessGroupID in $AccessGroup.data.Permissions.id) { - foreach ($Permission in $Permissions) { - if ($AccessGroupID -eq $Permission.id.id) { - foreach ($PermissionGroup in $Permission.base.UserOrGroup.id) { - foreach ($Administrator in $Administrators) { - if ($Administrator.Id.id -eq $PermissionGroup) { - $AdministratorIDNameResults += $Administrator.base.name - break + try { + Write-PScriboMessage "Discovered $($AccessGroup.base.Name) Access Groups Detailed Information." + $AdministratorIDNameResults = @() + # Find Administrator ID Name + foreach ($AccessGroupID in $AccessGroup.data.Permissions.id) { + foreach ($Permission in $Permissions) { + if ($AccessGroupID -eq $Permission.id.id) { + foreach ($PermissionGroup in $Permission.base.UserOrGroup.id) { + foreach ($Administrator in $Administrators) { + if ($Administrator.Id.id -eq $PermissionGroup) { + $AdministratorIDNameResults += $Administrator.base.name + break + } } + $AdministratorIDName = $AdministratorIDNameResults } - $AdministratorIDName = $AdministratorIDNameResults } } } - } - if ($AdministratorIDName) { - Section -ExcludeFromTOC -Style NOTOCHeading5 $AccessGroup.base.Name { - $OutObj = @() - foreach ($Principal in ($AdministratorIDName | Select-Object -Unique)) { - $PrincipalPermissionsName = @() - $PrincipalID = ($Administrators | Where-Object { $_.Base.Name -eq $Principal }).Id.Id - $PrincipalPermissions = ($Permissions.Base | Where-Object { $_.UserOrGroup.Id -eq $PrincipalID }).Role.Id - foreach ($PrincipalPermission in $PrincipalPermissions) { - $PrincipalPermissionsName += $(($Roles | Where-Object { $_.Id.id -eq $PrincipalPermission }).Base.Name) - } + if ($AdministratorIDName) { + Section -ExcludeFromTOC -Style NOTOCHeading5 $AccessGroup.base.Name { + $OutObj = @() + foreach ($Principal in ($AdministratorIDName | Select-Object -Unique)) { + $PrincipalPermissionsName = @() + $PrincipalID = ($Administrators | Where-Object { $_.Base.Name -eq $Principal }).Id.Id + $PrincipalPermissions = ($Permissions.Base | Where-Object { $_.UserOrGroup.Id -eq $PrincipalID }).Role.Id + foreach ($PrincipalPermission in $PrincipalPermissions) { + $PrincipalPermissionsName += $(($Roles | Where-Object { $_.Id.id -eq $PrincipalPermission }).Base.Name) + } - $inObj = [ordered] @{ - 'Name' = $Principal - 'Permissions' = [string](($PrincipalPermissionsName | Select-Object -Unique) -join ', ') - } + $inObj = [ordered] @{ + 'Name' = $Principal + 'Permissions' = [string](($PrincipalPermissionsName | Select-Object -Unique) -join ', ') + } - $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) - } + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } - $TableParams = @{ - Name = "Access Groups - $($AccessGroup.base.Name)" - List = $false - ColumnWidths = 35, 65 - } + $TableParams = @{ + Name = "Access Groups - $($AccessGroup.base.Name)" + List = $false + ColumnWidths = 35, 65 + } - if ($Report.ShowTableCaptions) { - $TableParams['Caption'] = "- $($TableParams.Name)" + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Sort-Object -Property 'Name' | Table @TableParams } - $OutObj | Sort-Object -Property 'Name' | Table @TableParams } + } catch { + Write-PScriboMessage -IsWarning $_.Exception.Message } } } diff --git a/Src/Private/Get-AbrHRZApplicationPool.ps1 b/Src/Private/Get-AbrHRZApplicationPool.ps1 index 6addd96..1583bfb 100644 --- a/Src/Private/Get-AbrHRZApplicationPool.ps1 +++ b/Src/Private/Get-AbrHRZApplicationPool.ps1 @@ -107,7 +107,7 @@ function Get-AbrHRZApplicationPool { $OtherApplicationFileTypes = $App.ExecutionData.OtherFileTypes | ForEach-Object { $_.FileType } $OtherApplicationFileTypesresult = $OtherApplicationFileTypes -join ', ' - Section -Style NOTOCHeading5 "Application Summary - $($App.Data.DisplayName)" { + Section -Style Heading5 "Application Summary - $($App.Data.DisplayName)" { $OutObj = @() Write-PScriboMessage "Discovered $($App.Data.DisplayName) Applications Information." $inObj = [ordered] @{ diff --git a/Src/Private/Get-AbrHRZCertMgmt.ps1 b/Src/Private/Get-AbrHRZCertMgmt.ps1 index f3a183c..e095d01 100644 --- a/Src/Private/Get-AbrHRZCertMgmt.ps1 +++ b/Src/Private/Get-AbrHRZCertMgmt.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZCertMgmt { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -54,7 +54,7 @@ function Get-AbrHRZCertMgmt { 'Certificate Thumbprint' = $PodCert.Thumbprint } $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) - if ($HealthCheck.ConnectionServers.Status) { + if ($HealthCheck.Components.ConnectionServers) { $OutObj | Where-Object { $_.'Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled' } $TableParams = @{ diff --git a/Src/Private/Get-AbrHRZConnectionServer.ps1 b/Src/Private/Get-AbrHRZConnectionServer.ps1 index db986f6..50b2a63 100644 --- a/Src/Private/Get-AbrHRZConnectionServer.ps1 +++ b/Src/Private/Get-AbrHRZConnectionServer.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZConnectionServer { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.6 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -54,7 +54,7 @@ function Get-AbrHRZConnectionServer { } } - if ($HealthCheck.ConnectionServers.Status) { + if ($HealthCheck.Components.ConnectionServers) { $OutObj | Where-Object { $_.'Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled' } @@ -72,7 +72,7 @@ function Get-AbrHRZConnectionServer { try { $OutObj = @() foreach ($ConnectionServer in $ConnectionServers) { - Section -Style NOTOCHeading5 "General $($ConnectionServer.General.Name) Details" { + Section -Style Heading4 "General $($ConnectionServer.General.Name) Details" { try { $ConnectionServerTags = $ConnectionServer.General | ForEach-Object { $_.Tags } $ConnectionServerTagsresult = $ConnectionServerTags -join ', ' @@ -108,13 +108,21 @@ function Get-AbrHRZConnectionServer { 'IP Mode' = $ConnectionServer.General.IpMode 'FIPs Mode Enabled' = $ConnectionServer.General.FipsModeEnabled 'Replication Status' = $ConnectionServerHealthData.ReplicationStatus.Status - 'Current CPU Usage Percentage' = $($ConnectionServerHealthData.ResourcesData.CpuUsagePercentage).ToString() + '%' - 'Current Memory Usage Percentage' = $($ConnectionServerHealthData.ResourcesData.MemoryUsagePercentage).ToString() + '%' + 'Current CPU Usage Percentage' = switch ([string]::IsNullOrEmpty($ConnectionServerHealthData.ResourcesData.CpuUsagePercentage)) { + $true { '--' } + $false { "$($ConnectionServerHealthData.ResourcesData.CpuUsagePercentage)%" } + default { 'Unknown' } + } + 'Current Memory Usage Percentage' = switch ([string]::IsNullOrEmpty($ConnectionServerHealthData.ResourcesData.MemoryUsagePercentage)) { + $true { '--' } + $false { "$($ConnectionServerHealthData.ResourcesData.MemoryUsagePercentage)%" } + default { 'Unknown' } + } } $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) - if ($HealthCheck.ConnectionServers.Status) { + if ($HealthCheck.Components.ConnectionServers) { $OutObj | Where-Object { $_.'Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled' } @@ -137,7 +145,7 @@ function Get-AbrHRZConnectionServer { try { $OutObj = @() - Section -Style NOTOCHeading5 "Authentication $($ConnectionServer.General.Name) Details" { + Section -Style Heading5 "Authentication $($ConnectionServer.General.Name) Details" { try { Write-PScriboMessage "Discovered Connection Servers Authentication Information $($ConnectionServer.General.Name)." @@ -192,11 +200,11 @@ function Get-AbrHRZConnectionServer { } try { $OutObj = @() - Section -Style NOTOCHeading5 "Backup $($ConnectionServer.General.Name) Details" { + Section -Style Heading5 "Backup $($ConnectionServer.General.Name) Details" { try { Write-PScriboMessage "Discovered Connection Servers Authentication Information $($ConnectionServer.General.Name)." $inObj = [ordered] @{ - 'Automatic Backup Frequency' = Switch ($ConnectionServer.Backup.LdapBackupFrequencyTime) { + 'Automatic Backup Frequency' = switch ($ConnectionServer.Backup.LdapBackupFrequencyTime) { 'DAY_1' { 'Every day' } 'DAY_2' { 'Every 2 day' } 'HOUR_1' { 'Every hour' } @@ -214,7 +222,7 @@ function Get-AbrHRZConnectionServer { $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) - if ($HealthCheck.ConnectionServers.Status) { + if ($HealthCheck.Components.ConnectionServers) { $OutObj | Where-Object { $_.'Last Backup Status' -ne 'OK' } | Set-Style -Style Warning -Property 'Last Backup Status' $OutObj | Where-Object { $_.'Automatic Backup Frequency' -eq 'Disabled' } | Set-Style -Style Critical -Property 'Automatic Backup Frequency' } @@ -238,7 +246,7 @@ function Get-AbrHRZConnectionServer { } try { $OutObj = @() - Section -Style NOTOCHeading5 "Certificate Details for $($ConnectionServer.General.Name) Details" { + Section -Style Heading5 "Certificate Details for $($ConnectionServer.General.Name) Details" { try { # Connection Server Health Data @@ -272,7 +280,7 @@ function Get-AbrHRZConnectionServer { 'Certificate Thumbprint' = $PodCert.Thumbprint } $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) - if ($HealthCheck.ConnectionServers.Status) { + if ($HealthCheck.Components.ConnectionServers) { $OutObj | Where-Object { $_.'Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled' } $TableParams = @{ @@ -295,17 +303,17 @@ function Get-AbrHRZConnectionServer { if ($InfoLevel.settings.servers.ConnectionServers.ConnectionServers -ge 2) { try { $OutObj = @() - Section -Style NOTOCHeading5 "Replication Status for Connection Server $($connectionserver.General.Name)" { + Section -Style Heading5 "Replication Status for Connection Server $($connectionserver.General.Name)" { try { Write-PScriboMessage "Working on Replication Information for $($connectionserver.General.Name)." - If ($CSHealth.Message) { + if ($CSHealth.Message) { $CSHealthMessage = $CSHealth.Message } else { $CSHealthMessage = "No Replication Issues" } - foreach ($CSHealth in ($ConnectionServersHealth | Where-Object { $_.Name -EQ $connectionserver.General.Name })) { + foreach ($CSHealth in ($ConnectionServersHealth | Where-Object { $_.Name -eq $connectionserver.General.Name })) { $inObj = [ordered] @{ 'Connection Server' = $CSHealth.Name 'Replication Partner' = $($CSHealth.ReplicationStatus | ForEach-Object { $_.ServerName }) -join ',' diff --git a/Src/Private/Get-AbrHRZDatastore.ps1 b/Src/Private/Get-AbrHRZDatastore.ps1 index 208a911..d0e0ea5 100644 --- a/Src/Private/Get-AbrHRZDatastore.ps1 +++ b/Src/Private/Get-AbrHRZDatastore.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZDatastore { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -31,7 +31,7 @@ function Get-AbrHRZDatastore { try { if ($vCenterHealth) { if ($InfoLevel.Settings.Servers.vCenterServers.DataStores -ge 1) { - Section -Style NOTOCHeading5 "Datastores" { + Section -Style Heading5 "Datastores" { $OutObj = @() $Datastores = $vCenterHealth.datastoredata foreach ($DataStore in $Datastores) { @@ -50,7 +50,7 @@ function Get-AbrHRZDatastore { } } - if ($HealthCheck.DataStores.Status) { + if ($HealthCheck.vSphere.DataStores) { $OutObj | Where-Object { $_.'Accessible' -eq 'No' } | Set-Style -Style Warning } @@ -83,7 +83,7 @@ function Get-AbrHRZDatastore { $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) - if ($HealthCheck.DataStores.Status) { + if ($HealthCheck.vSphere.DataStores) { $OutObj | Where-Object { $_.'Accessible' -eq 'No' } | Set-Style -Style Warning -Property 'Accessible' } diff --git a/Src/Private/Get-AbrHRZDesktopPool.ps1 b/Src/Private/Get-AbrHRZDesktopPool.ps1 index 7fae0f4..aea0bc5 100644 --- a/Src/Private/Get-AbrHRZDesktopPool.ps1 +++ b/Src/Private/Get-AbrHRZDesktopPool.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZDesktopPool { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -280,7 +280,7 @@ function Get-AbrHRZDesktopPool { } } try { - Section -Style NOTOCHeading5 "Pool - $($Pool.Base.name)" { + Section -Style Heading5 "Pool - $($Pool.Base.name)" { $SupportedDisplayProtocolsresult = '' $SupportedDisplayProtocols = $Pool.DesktopSettings.DisplayProtocolSettings | ForEach-Object { $_.SupportedDisplayProtocols } $SupportedDisplayProtocolsresult = $SupportedDisplayProtocols -join ', ' @@ -676,7 +676,7 @@ function Get-AbrHRZDesktopPool { $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } } - $TableParams += @{ + $TableParams = @{ Name = "Desktop Pools Entitlements - $($Pool.Base.Name)" List = $false ColumnWidths = 34, 33, 33 diff --git a/Src/Private/Get-AbrHRZDomain.ps1 b/Src/Private/Get-AbrHRZDomain.ps1 index 488a552..6714dd0 100644 --- a/Src/Private/Get-AbrHRZDomain.ps1 +++ b/Src/Private/Get-AbrHRZDomain.ps1 @@ -86,7 +86,7 @@ function Get-AbrHRZDomain { } } - if ($HealthCheck.DataStores.Status) { + if ($HealthCheck.vSphere.DataStores) { $OutObj | Where-Object { $_.'Status' -eq 'ERROR' } | Set-Style -Style Warning } diff --git a/Src/Private/Get-AbrHRZESXi.ps1 b/Src/Private/Get-AbrHRZESXi.ps1 index f98bef7..448633a 100644 --- a/Src/Private/Get-AbrHRZESXi.ps1 +++ b/Src/Private/Get-AbrHRZESXi.ps1 @@ -31,12 +31,12 @@ function Get-AbrHRZESXi { try { if ($vCenterHealth) { if ($InfoLevel.Settings.Servers.vCenterServers.ESXiHosts -ge 1) { - Section -Style NOTOCHeading5 "ESXi Hosts" { + Section -Style Heading3 "ESXi Hosts" { Paragraph "The following section details the hardware information of ESXi Hosts for $($HVEnvironment.toUpper()) server." BlankLine $ESXHosts = $vCenterHealth.hostdata foreach ($ESXCLUSTER in ($ESXHosts.ClusterName | Select-Object -Unique)) { - Section -Style NOTOCHeading5 "$($ESXCLUSTER) Cluster" { + Section -Style Heading4 "$($ESXCLUSTER) Cluster" { $OutObj = @() try { foreach ($ESXHost in ($ESXHosts | Where-Object { $_.ClusterName -eq $ESXCLUSTER })) { @@ -50,7 +50,7 @@ function Get-AbrHRZESXi { $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } - if ($HealthCheck.ESXiHosts.Status) { + if ($HealthCheck.vSphere.ESXiHosts) { $OutObj | Where-Object { $_.'Status' -ne 'CONNECTED' } | Set-Style -Style Warning } } catch { @@ -72,7 +72,8 @@ function Get-AbrHRZESXi { foreach ($ESXHost in ($ESXHosts | Where-Object { $_.ClusterName -eq $ESXCLUSTER })) { if ($ESXHost.Name) { try { - Section -ExcludeFromTOC -Style NOTOCHeading6 "$($ESXHost.Name) Details" { + Section -ExcludeFromTOC -Style NOTOCHeading5 "$($ESXHost.Name) Details" { + $OutObj = @() Write-PScriboMessage "Discovered ESXI Server Information from $($ESXHost.Name)." $inObj = [ordered] @{ 'CPU Cores' = $ESXHost.NumCpuCores diff --git a/Src/Private/Get-AbrHRZEventConf.ps1 b/Src/Private/Get-AbrHRZEventConf.ps1 index ba5b322..6eeae3d 100644 --- a/Src/Private/Get-AbrHRZEventConf.ps1 +++ b/Src/Private/Get-AbrHRZEventConf.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZEventConf { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -56,7 +56,7 @@ function Get-AbrHRZEventConf { $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } - if ($HealthCheck.EventConfiguration.EventDatabase) { + if ($HealthCheck.Components.EventDatabase) { $OutObj | Where-Object { $_.'Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled' } diff --git a/Src/Private/Get-AbrHRZFarm.ps1 b/Src/Private/Get-AbrHRZFarm.ps1 index ef60963..758f39f 100644 --- a/Src/Private/Get-AbrHRZFarm.ps1 +++ b/Src/Private/Get-AbrHRZFarm.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZFarm { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -46,7 +46,7 @@ function Get-AbrHRZFarm { $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } - if ($HealthCheck.Farms.Status) { + if ($HealthCheck.RDSFarms.RDSFarms) { $OutObj | Where-Object { $_.'Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled' } @@ -64,12 +64,12 @@ function Get-AbrHRZFarm { if ($InfoLevel.Inventory.Farms -ge 2) { Section -Style Heading4 "Farm Pools Details" { foreach ($Farm in $Farms) { - Section -Style NOTOCHeading5 $($Farm.Data.name) { + Section -Style Heading5 $($Farm.Data.name) { # Find out Access Group for Applications $AccessgroupMatch = $false $AccessgroupJoined = @() $AccessgroupJoined += $Accessgroups - $AccessgroupJoined += $Accessgroups.Children + if ($Accessgroups.Children) { $AccessgroupJoined += $Accessgroups.Children } foreach ($Accessgroup in $AccessgroupJoined) { if ($Accessgroup.Id.id -eq $Farm.data.accessgroup.id) { $AccessGroupName = $Accessgroup.base.name @@ -134,7 +134,7 @@ function Get-AbrHRZFarm { $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) - if ($HealthCheck.Farms.Status) { + if ($HealthCheck.RDSFarms.RDSFarms) { $OutObj | Where-Object { $_.'Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Enabled' } @@ -199,7 +199,7 @@ function Get-AbrHRZFarm { $OutObj = [pscustomobject](ConvertTo-HashToYN $inObj) - if ($HealthCheck.Farms.Status) { + if ($HealthCheck.RDSFarms.RDSFarms) { $OutObj | Where-Object { $_.'Provisioning Enabled' -eq 'No' } | Set-Style -Style Warning -Property 'Provisioning Enabled' } diff --git a/Src/Private/Get-AbrHRZGlobalEntitlement.ps1 b/Src/Private/Get-AbrHRZGlobalEntitlement.ps1 index 8b6217c..ec90707 100644 --- a/Src/Private/Get-AbrHRZGlobalEntitlement.ps1 +++ b/Src/Private/Get-AbrHRZGlobalEntitlement.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZGlobalEntitlement { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -40,7 +40,7 @@ function Get-AbrHRZGlobalEntitlement { $GlobalApplicationEntitlementGroups | ForEach-Object { $_ | Add-Member -MemberType NoteProperty -Name "GE_Type" -Value "Application" } $GlobalEntitlementJoined = @() $GlobalEntitlementJoined += $GlobalEntitlements - $GlobalEntitlementJoined += $GlobalApplicationEntitlementGroups + if ($GlobalApplicationEntitlementGroups) { $GlobalEntitlementJoined += $GlobalApplicationEntitlementGroups } $OutObj = @() foreach ($GlobalEntitlement in $GlobalEntitlementJoined) { @@ -78,7 +78,7 @@ function Get-AbrHRZGlobalEntitlement { Write-PScriboMessage "Discovered Global Entitlements Detailed Information for $($GlobalEntitlement.base.DisplayName)." try { if ($InfoLevel.Inventory.GlobalEntitlements -ge 2) { - Section -Style NOTOCHeading5 "Summary - $($GlobalEntitlement.base.DisplayName)" { + Section -Style Heading5 "Summary - $($GlobalEntitlement.base.DisplayName)" { $SupportedDisplayProtocolsresult = '' $SupportedDisplayProtocols = $GlobalEntitlement.base | ForEach-Object { $_.SupportedDisplayProtocols } diff --git a/Src/Private/Get-AbrHRZHCConnection.ps1 b/Src/Private/Get-AbrHRZHCConnection.ps1 index 78fb78f..cec5fdb 100644 --- a/Src/Private/Get-AbrHRZHCConnection.ps1 +++ b/Src/Private/Get-AbrHRZHCConnection.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZHCConnection { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -31,12 +31,12 @@ function Get-AbrHRZHCConnection { try { if ($ConnectionServersHealth) { if ($HealthCheck.Components.ConnectionServers) { - Section -Style Heading3 "Connection Server Health Information" { + Section -Style Heading3 "Connection Server Health Information" { Paragraph "The following section details on the connection server health information for $($HVEnvironment.toUpper())." BlankLine $OutObj = @() foreach ($CSHealth in $ConnectionServersHealth) { - if($CSHealth.CertificateHealth.ExpirationTime -lt ((Get-Date).AddDays(30))) { + if ($CSHealth.CertificateHealth.ExpirationTime -lt ((Get-Date).AddDays(30))) { $ConServCertExpiry = "Certificate Expiring Soon" } elseif ($CSHealth.CertificateHealth.ExpirationTime -lt (Get-Date)) { $ConServCertExpiry = "Certificate Expired" diff --git a/Src/Private/Get-AbrHRZRegisteredMachine.ps1 b/Src/Private/Get-AbrHRZRegisteredMachine.ps1 index 8b30a4b..88c8dfb 100644 --- a/Src/Private/Get-AbrHRZRegisteredMachine.ps1 +++ b/Src/Private/Get-AbrHRZRegisteredMachine.ps1 @@ -5,7 +5,7 @@ function Get-AbrHRZRegisteredMachine { .DESCRIPTION Documents the configuration of VMware Horizon in Word/HTML/XML/Text formats using PScribo. .NOTES - Version: 1.1.5 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -49,7 +49,7 @@ function Get-AbrHRZRegisteredMachine { $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } - if ($HealthCheck.RegisteredMachines.Status) { + if ($HealthCheck.RDSFarms.RDSFarms) { $OutObj | Where-Object { $_.'Status' -ne 'AVAILABLE' } | Set-Style -Style Warning } @@ -126,7 +126,7 @@ function Get-AbrHRZRegisteredMachine { } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) } - if ($HealthCheck.RegisteredMachines.Status) { + if ($HealthCheck.RDSFarms.RDSFarms) { $OutObj | Where-Object { $_.'Status' -ne 'AVAILABLE' } | Set-Style -Style Warning } $TableParams = @{ diff --git a/Src/Public/Invoke-ASBuiltReport.VMware.Horizon.ps1 b/Src/Public/Invoke-ASBuiltReport.VMware.Horizon.ps1 index 35428ed..dea029a 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.1 + Version: 1.1.7 Author: Chris Hildebrandt, Karl Newick Twitter: @childebrandt42, @karlnewick Editor: Jonathan Colon, @jcolonfzenpr @@ -401,7 +401,7 @@ try { # Gateway Certificates - $script:GatewayCerts = $hzServices.GlobalSettings.GlobalSettings_ListGatewayCertificates() + $script:GatewayCerts = $hzServices.GlobalSettings.GlobalSettings_ListGatewayCertificates() | Out-Null } catch { Write-PScriboMessage -IsWarning $_.Exception.Message } @@ -486,19 +486,19 @@ Get-AbrHRZHCTrueSSO } } - if ($HealthCheck.RDSFarms -and $farms) { + if ($HealthCheck.RDSFarms.RDSFarms -and $farms) { Section -Style Heading2 'RDS Farms' { Get-AbrHRZHCRDSFarm } } - if ($healthcheck.vSphere.datastores -or $healthcheck.vSphere.vCenter -or $healthcheck.vSphere.esxiHosts) { + if ($healthcheck.vSphere.Datastores -or $healthcheck.vSphere.vCenter -or $healthcheck.vSphere.esxiHosts) { Section -Style Heading2 'vSphere' { Get-AbrHRZHCDataStore Get-AbrHRZHCvCenter Get-AbrHRZHCESXiHost } } - if ($HealthCheck.OtherComponents.domains -or $HealthCheck.OtherComponents.SAML2 -or $HealthCheck.OtherComponents.LicenseService) { + if ($HealthCheck.OtherComponents.Domains -or $HealthCheck.OtherComponents.SAML2 -or $HealthCheck.OtherComponents.LicenseService) { Section -Style Heading2 'Other Components' { Get-AbrHRZHCDomain Get-AbrHRZHCSAML2