diff --git a/AsBuiltReport.Veeam.VBR/AsBuiltReport.Veeam.VBR.psd1 b/AsBuiltReport.Veeam.VBR/AsBuiltReport.Veeam.VBR.psd1 index 1eb8109..c446cc3 100644 --- a/AsBuiltReport.Veeam.VBR/AsBuiltReport.Veeam.VBR.psd1 +++ b/AsBuiltReport.Veeam.VBR/AsBuiltReport.Veeam.VBR.psd1 @@ -12,7 +12,7 @@ RootModule = 'AsBuiltReport.Veeam.VBR.psm1' # Version number of this module. - ModuleVersion = '1.0.6' + ModuleVersion = '1.0.7' # Supported PSEditions CompatiblePSEditions = @('Desktop', 'Core') @@ -63,7 +63,7 @@ } @{ ModuleName = 'AsBuiltReport.Diagram'; - ModuleVersion = '1.0.8' + ModuleVersion = '1.0.10' } ) diff --git a/AsBuiltReport.Veeam.VBR/Language/en-US/VeeamVBR.psd1 b/AsBuiltReport.Veeam.VBR/Language/en-US/VeeamVBR.psd1 index 983e477..d0bb12c 100644 --- a/AsBuiltReport.Veeam.VBR/Language/en-US/VeeamVBR.psd1 +++ b/AsBuiltReport.Veeam.VBR/Language/en-US/VeeamVBR.psd1 @@ -2051,6 +2051,8 @@ Paragraph = The following section provides a summary of all configured Veeam Backup Proxies, including their type, status, and maximum concurrent task settings. VMwareHeading = VMware Backup Proxies HyperVHeading = Hyper-V Backup Proxies + NASHeading = NAS Backup Proxies + CDPHeading = CDP Backup Proxies HardwareSoftwareHeading = Hardware & Software Inventory LocalDisksHeading = Local Disks SanDisksHeading = SAN Disks @@ -2125,6 +2127,10 @@ IPv4Gateway = IPv4 Gateway DisplayName = Display Name ShortName = Short Name + CacheSize = Cache Size + CachePath = Cache Path + SourceProxyTrafficPort = Source Port + TargetProxyTrafficPort = Target Port '@ GetAbrVbrScaleOutRepository = ConvertFrom-StringData @' diff --git a/AsBuiltReport.Veeam.VBR/Language/es-ES/VeeamVBR.psd1 b/AsBuiltReport.Veeam.VBR/Language/es-ES/VeeamVBR.psd1 index 0eacf84..40443e1 100644 --- a/AsBuiltReport.Veeam.VBR/Language/es-ES/VeeamVBR.psd1 +++ b/AsBuiltReport.Veeam.VBR/Language/es-ES/VeeamVBR.psd1 @@ -2053,6 +2053,8 @@ Paragraph = La siguiente sección proporciona un resumen de todos los proxies de copia de seguridad configurados de Veeam, incluido su tipo, estado y configuración de tareas concurrentes máximas. VMwareHeading = Proxies de copia de seguridad de VMware HyperVHeading = Proxies de copia de seguridad de Hyper-V + NASHeading = NAS Proxies Backup + CDPHeading = CDP Proxies de Backup HardwareSoftwareHeading = Inventario de hardware y software LocalDisksHeading = Discos locales SanDisksHeading = Discos SAN @@ -2127,6 +2129,10 @@ IPv4Gateway = Puerta de enlace IPv4 DisplayName = Nombre para mostrar ShortName = Nombre corto + CacheSize = Cache Size + CachePath = Cache Path + SourceProxyTrafficPort = Source Port + TargetProxyTrafficPort = Target Port '@ GetAbrVbrScaleOutRepository = ConvertFrom-StringData @' diff --git a/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrCDPProxyInfo.ps1 b/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrCDPProxyInfo.ps1 new file mode 100644 index 0000000..4c06d1a --- /dev/null +++ b/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrCDPProxyInfo.ps1 @@ -0,0 +1,60 @@ +function Get-AbrCDPProxyInfo { + <# + .SYNOPSIS + Retrieves information about CDP proxies from the Veeam Backup & Replication server. + + .DESCRIPTION + The Get-AbrCDPProxyInfo function collects and returns information about CDP proxies configured on the Veeam Backup & Replication server. + It retrieves the proxy server details, including whether they are enabled and the maximum number of concurrent tasks they can handle. + + .PARAMETERS + This function does not take any parameters. + + .OUTPUTS + System.Object + Returns a collection of PSCustomObject containing the following properties: + - Name: The name of the CDP proxy server. + - AditionalInfo: An ordered dictionary with the following keys: + - Enabled: Indicates whether the proxy server is enabled ('Yes' or 'No'). + - Max Tasks: The maximum number of concurrent tasks the proxy server can handle. + - IconType: The icon type associated with the proxy server. + + .EXAMPLE + PS C:\> Get-AbrCDPProxyInfo + Collects and displays information about CDP proxies from the Veeam Backup & Replication server. + + .NOTES + This function uses the Get-AbrCDPProxyServer cmdlet to retrieve the CDP proxy server information and the Get-AbrIconType function to determine the icon type. + Author: AsBuiltReport + Date: 2024-12-30 + Version: 1.0 + #> + param () + try { + Write-PScriboMessage "Collecting CDP Proxy information from $($VBRServer)." + $Proxies = Get-VBRCDPProxy + + if ($Proxies) { + $ProxiesInfo = $Proxies | ForEach-Object { + $inobj = [ordered] @{ + 'Enabled' = if ($_.IsEnabled) { 'Yes' } else { 'No' } + 'Cache Size' = "$($_.CacheSize) $($_.CacheSizeUnit)" + 'Cache Path' = $_.CachePath + } + + $IconType = Get-AbrIconType -String 'ProxyServer' + + [PSCustomObject] @{ + Name = $_.Name + AditionalInfo = $inobj + IconType = $IconType + } + } + } + + return $ProxiesInfo + + } catch { + Write-PScriboMessage $_.Exception.Message + } +} \ No newline at end of file diff --git a/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrDiagBackupToCDPProxy.ps1 b/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrDiagBackupToCDPProxy.ps1 new file mode 100644 index 0000000..a243cf2 --- /dev/null +++ b/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrDiagBackupToCDPProxy.ps1 @@ -0,0 +1,50 @@ +function Get-AbrDiagBackupToCDPProxy { + <# + .SYNOPSIS + Function to build Backup Server to Proxy diagram. + .DESCRIPTION + Build a diagram of the configuration of Veeam VBR in PDF/PNG/SVG formats using Psgraph. + .NOTES + Version: 1.0.3 + Author: AsBuiltReport Organization + Twitter: @asbuiltreport + Github: asbuiltreport + .LINK + https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR + #> + [CmdletBinding()] + + param + ( + + ) + + begin { + } + + process { + try { + $CDPBackupProxy = Get-AbrBackupProxyInfo -Type 'cdp' + if ($BackupServerInfo) { + if ($CDPBackupProxy) { + + if ($CDPBackupProxy.Name.Count -le 1) { + $CDPBackupProxyColumnSize = 1 + } elseif ($ColumnSize) { + $CDPBackupProxyColumnSize = $ColumnSize + } else { + $CDPBackupProxyColumnSize = $CDPBackupProxy.Name.Count + } + + Node CDPProxies @{Label = (Add-HtmlNodeTable -Name 'CDPProxies' -ImagesObj $Images -inputObject ($CDPBackupProxy | ForEach-Object { $_.Name.split('.')[0] }) -Align 'Center' -iconType 'VBR_Proxy_Server' -ColumnSize $CDPBackupProxyColumnSize -IconDebug $IconDebug -MultiIcon -AditionalInfo $CDPBackupProxy.AditionalInfo -Subgraph -SubgraphIconType 'VBR_Proxy' -SubgraphLabel 'CDP Backup Proxies' -SubgraphLabelPos 'top' -SubgraphTableStyle 'dashed,rounded' -FontColor $Fontcolor -TableBackgroundColor $MainGraphBGColor -CellBackgroundColor $MainGraphBGColor -TableBorderColor $Edgecolor -TableBorder '1' -FontSize 18 -SubgraphLabelFontSize 26 -SubgraphFontBold -SubgraphLabelFontColor $Fontcolor); shape = 'plain'; fontsize = 14; fontname = 'Segoe Ui' } + + Edge -From BackupServers -To CDPProxies @{minlen = 3 } + + } + } + } catch { + Write-PScriboMessage $_.Exception.Message + } + } + end {} +} \ No newline at end of file diff --git a/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrVbrBackupProxyInfo.ps1 b/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrVbrBackupProxyInfo.ps1 index b714db9..32ce12a 100644 --- a/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrVbrBackupProxyInfo.ps1 +++ b/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrVbrBackupProxyInfo.ps1 @@ -19,7 +19,7 @@ function Get-AbrBackupProxyInfo { param ( # Backup Proxy Type - [ValidateSet('vmware', 'hyperv', 'nas')] + [ValidateSet('vmware', 'hyperv', 'nas', 'proxy')] [string] $Type ) @@ -30,7 +30,7 @@ function Get-AbrBackupProxyInfo { 'vmware' { Get-VBRViProxy } 'hyperv' { Get-VBRHvProxy } 'nas' { Get-VBRNASProxyServer } - + 'cdp' { Get-VBRCDPProxy } } $BackupProxies = $BPType $BackupProxyInfo = @() @@ -41,6 +41,7 @@ function Get-AbrBackupProxyInfo { 'vmware' { $BackupProxy.Host.Name } 'hyperv' { $BackupProxy.Host.Name } 'nas' { $BackupProxy.Server.Name } + 'cdp' { $BackupProxy.Name } } $Status = switch ($Type) { @@ -62,6 +63,12 @@ function Get-AbrBackupProxyInfo { $true { 'Enabled' } } } + 'proxy' { + switch ($BackupProxy.IsEnabled) { + $false { 'Disabled' } + $true { 'Enabled' } + } + } } $BPRows = [ordered]@{ @@ -76,11 +83,13 @@ function Get-AbrBackupProxyInfo { } } 'nas' { 'File Backup' } + 'cdp' { 'CDP Backup' } } Concurrent_Tasks = switch ($Type) { 'vmware' { $BackupProxy.MaxTasksCount } 'hyperv' { $BackupProxy.MaxTasksCount } 'nas' { $BackupProxy.ConcurrentTaskNumber } + 'proxy' { 1 } } } @@ -88,6 +97,7 @@ function Get-AbrBackupProxyInfo { 'vmware' { 'VBR_Proxy_Server' } 'hyperv' { 'VBR_Proxy_Server' } 'nas' { 'VBR_AGENT_Server' } + 'cdp' { 'VBR_Proxy_Server' } } $TempBackupProxyInfo = [PSCustomObject]@{ diff --git a/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrVbrInfraDiagram.ps1 b/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrVbrInfraDiagram.ps1 index bd1fd5f..9a3f535 100644 --- a/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrVbrInfraDiagram.ps1 +++ b/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/Get-AbrVbrInfraDiagram.ps1 @@ -129,9 +129,17 @@ function Get-AbrInfraDiagram { Write-PScriboMessage "Error Message: $($_.Exception.Message)" } } + if ($CDPProxies = Get-AbrCDPProxyInfo) { + try { + $ProxiesCdp = Add-HtmlNodeTable -Name 'ProxiesCdp' -ImagesObj $Images -inputObject (($CDPProxies).Name | ForEach-Object { $_.split('.')[0] }) -Align 'Center' -iconType 'VBR_Proxy_Server' -ColumnSize 3 -IconDebug $IconDebug -MultiIcon -AditionalInfo ($CDPProxies.AditionalInfo) -Subgraph -SubgraphIconType 'VBR_NAS' -SubgraphLabel 'CDP Proxies' -SubgraphLabelPos 'top' -SubgraphTableStyle 'dashed,rounded' -FontColor $FontColor -SubgraphLabelFontColor $FontColor -TableBorderColor $Edgecolor -TableBorder '1' -SubgraphLabelFontSize 22 -FontSize 18 -SubgraphFontBold -TableBackgroundColor $MainGraphBGColor -CellBackgroundColor $MainGraphBGColor + } catch { + Write-PScriboMessage 'Error: Unable to create ProxiesCdp Objects. Disabling the section' + Write-PScriboMessage "Error Message: $($_.Exception.Message)" + } + } } - if ($Proxies -and ($ProxiesVi -or $ProxiesHv -or $ProxiesNas)) { + if ($Proxies -and ($ProxiesVi -or $ProxiesHv -or $ProxiesNas -or $ProxiesCdp)) { $ProxyNodesArray = @() @@ -144,6 +152,9 @@ function Get-AbrInfraDiagram { if ($NASProxies) { $ProxyNodesArray += $ProxiesNas } + if ($CDPProxies) { + $ProxyNodesArray += $ProxiesCdp + } try { $ProxiesSubgraphNode = Node -Name 'Proxies' -Attributes @{Label = (Add-HtmlSubGraph -Name 'Proxies' -ImagesObj $Images -TableArray $ProxyNodesArray -Align 'Center' -IconDebug $IconDebug -IconType 'VBR_Proxy' -Label 'Backup Proxies' -LabelPos 'top' -FontColor $Fontcolor -TableStyle 'dashed,rounded' -TableBorderColor $Edgecolor -TableBorder '1' -ColumnSize 3 -FontSize 24 -FontBold -TableBackgroundColor $MainGraphBGColor); shape = 'plain'; fillColor = 'transparent'; fontsize = 14; fontname = 'Segoe Ui' } diff --git a/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/New-AbrVeeamDiagram.ps1 b/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/New-AbrVeeamDiagram.ps1 index 42afe36..d1e9e60 100644 --- a/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/New-AbrVeeamDiagram.ps1 +++ b/AsBuiltReport.Veeam.VBR/Src/Private/Diagram/New-AbrVeeamDiagram.ps1 @@ -124,7 +124,7 @@ function New-AbrVeeamDiagram { For best results, ensure all image assets meet the recommended size guidelines. .NOTES - Version: 1.0.3 + Version: 1.0.10 Author(s): Jonathan Colon Twitter: @asbuiltreport Github: asbuiltreport @@ -566,7 +566,7 @@ function New-AbrVeeamDiagram { if ($DiagramType -eq 'Backup-to-HyperV-Proxy') { Get-AbrDiagBackupServer - $BackuptoHyperVProxy = Get-AbrDiagBackupToHvProxy | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackuptoHyperVProxy = Get-AbrDiagBackupToHvProxy if ($BackuptoHyperVProxy) { $BackuptoHyperVProxy } else { @@ -574,7 +574,7 @@ function New-AbrVeeamDiagram { } } elseif ($DiagramType -eq 'Backup-to-vSphere-Proxy') { Get-AbrDiagBackupServer - $BackuptovSphereProxy = Get-AbrDiagBackupToViProxy | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackuptovSphereProxy = Get-AbrDiagBackupToViProxy if ($BackuptovSphereProxy) { $BackuptovSphereProxy } else { @@ -582,7 +582,7 @@ function New-AbrVeeamDiagram { } } elseif ($DiagramType -eq 'Backup-to-File-Proxy') { Get-AbrDiagBackupServer - $BackuptoFileProxy = Get-AbrDiagBackupToFileProxy | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackuptoFileProxy = Get-AbrDiagBackupToFileProxy if ($BackuptoFileProxy) { $BackuptoFileProxy } else { @@ -590,7 +590,7 @@ function New-AbrVeeamDiagram { } } elseif ($DiagramType -eq 'Backup-to-WanAccelerator') { Get-AbrDiagBackupServer - $BackuptoWanAccelerator = Get-AbrDiagBackupToWanAccel | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackuptoWanAccelerator = Get-AbrDiagBackupToWanAccel if ($BackuptoWanAccelerator) { $BackuptoWanAccelerator } else { @@ -598,7 +598,7 @@ function New-AbrVeeamDiagram { } } elseif ($DiagramType -eq 'Backup-to-Repository') { Get-AbrDiagBackupServer - $BackuptoRepository = Get-AbrDiagBackupToRepo | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackuptoRepository = Get-AbrDiagBackupToRepo if ($BackuptoRepository) { $BackuptoRepository } else { @@ -606,7 +606,7 @@ function New-AbrVeeamDiagram { } } elseif ($DiagramType -eq 'Backup-to-ProtectedGroup') { Get-AbrDiagBackupServer - $BackuptoProtectedGroup = Get-AbrDiagBackupToProtectedGroup | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackuptoProtectedGroup = Get-AbrDiagBackupToProtectedGroup if ($BackuptoProtectedGroup) { $BackuptoProtectedGroup } else { @@ -614,7 +614,7 @@ function New-AbrVeeamDiagram { } } elseif ($DiagramType -eq 'Backup-to-Tape') { Get-AbrDiagBackupServer - $BackupToTape = Get-AbrDiagBackupToTape | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackupToTape = Get-AbrDiagBackupToTape if ($BackupToTape) { $BackupToTape } else { @@ -622,7 +622,7 @@ function New-AbrVeeamDiagram { } } elseif ($DiagramType -eq 'Backup-to-Sobr') { Get-AbrDiagBackupServer - $BackuptoSobr = Get-AbrDiagBackupToSobr | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackuptoSobr = Get-AbrDiagBackupToSobr if ($BackuptoSobr) { $BackuptoSobr } else { @@ -630,7 +630,7 @@ function New-AbrVeeamDiagram { } } elseif ($DiagramType -eq 'Backup-Infrastructure') { Get-AbrDiagBackupServer - $BackupInfra = Get-AbrInfraDiagram | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackupInfra = Get-AbrInfraDiagram if ($BackupInfra) { $BackupInfra } else { @@ -638,21 +638,21 @@ function New-AbrVeeamDiagram { } } elseif ($DiagramType -eq 'Backup-to-CloudConnect') { Get-AbrDiagBackupServer - $BackuptoCloudConnect = Get-AbrDiagBackupToCloudConnect | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackuptoCloudConnect = Get-AbrDiagBackupToCloudConnect if ($BackuptoCloudConnect) { $BackuptoCloudConnect } else { throw 'No Cloud Connect infrastructure available to diagram' } } elseif ($DiagramType -eq 'Backup-to-CloudConnect-Tenant') { - $BackuptoCloudConnectTenant = Get-AbrDiagBackupToCloudConnectTenant | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackuptoCloudConnectTenant = Get-AbrDiagBackupToCloudConnectTenant if ($BackuptoCloudConnectTenant) { $BackuptoCloudConnectTenant } else { throw 'No Cloud Connect Tenant infrastructure available to diagram' } } elseif ($DiagramType -eq 'Backup-to-HACluster') { - $BackuptoHACluster = Get-AbrDiagBackupToHACluster | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch + $BackuptoHACluster = Get-AbrDiagBackupToHACluster if ($BackuptoHACluster) { $BackuptoHACluster } else { @@ -669,7 +669,9 @@ function New-AbrVeeamDiagram { #Export Diagram foreach ($OutputFormat in $Format) { - $OutputDiagram = Export-AbrDiagram -GraphObj ($diGraph | Select-String -Pattern '"([A-Z])\w+"\s\[label="";style="invis";shape="point";]' -NotMatch) -ErrorDebug $EnableErrorDebug -Format $OutputFormat -Filename $Filename -OutputFolderPath $OutputFolderPath -WaterMarkText $WaterMarkText -WaterMarkColor $WaterMarkColor -IconPath $IconPath -Verbose:$Verbose + $filterPattern = $diGraph | Select-String -Pattern '(?s)"?\w+"?\s+\[\s*label="";\s*shape="point";\s*style="invis";\s*\]', '(?s)"?\w+"?\s+\[\s*label="";\s*style="invis";\s*shape="point";\s*\]', '(?s)"?\w+"?\s+\[\s*shape="point";\s*label="";\s*style="invis";\s*\]', '(?s)"?\w+"?\s+\[\s*shape="point";\s*style="invis";\s*label="";\s*\]', '(?s)"?\w+"?\s+\[\s*style="invis";\s*label="";\s*shape="point";\s*\]', '(?s)"?\w+"?\s+\[\s*style="invis";\s*shape="point";\s*label="";\s*\]' -NotMatch + + $OutputDiagram = Export-AbrDiagram -GraphObj $filterPattern -ErrorDebug $EnableErrorDebug -Format $OutputFormat -Filename $Filename -OutputFolderPath $OutputFolderPath -WaterMarkText $WaterMarkText -WaterMarkColor $WaterMarkColor -IconPath $IconPath -Verbose:$Verbose if ($OutputDiagram) { if ($OutputFormat -eq 'Base64') { diff --git a/AsBuiltReport.Veeam.VBR/Src/Private/Report/Get-AbrVbrBackupProxy.ps1 b/AsBuiltReport.Veeam.VBR/Src/Private/Report/Get-AbrVbrBackupProxy.ps1 index 3f28127..6719038 100644 --- a/AsBuiltReport.Veeam.VBR/Src/Private/Report/Get-AbrVbrBackupProxy.ps1 +++ b/AsBuiltReport.Veeam.VBR/Src/Private/Report/Get-AbrVbrBackupProxy.ps1 @@ -6,7 +6,7 @@ function Get-AbrVbrBackupProxy { .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES - Version: 1.0.3 + Version: 1.0.6 Author: AsBuiltReport Organization Twitter: @asbuiltreport Github: asbuiltreport @@ -935,6 +935,106 @@ function Get-AbrVbrBackupProxy { } catch { Write-PScriboMessage -IsWarning "Hyper-V Backup Proxies Section: $($_.Exception.Message)" } + #---------------------------------------------------------------------------------------------# + # NAS / File Proxy information Section # + #---------------------------------------------------------------------------------------------# + try { + if ($BackupProxies = Get-VBRComputerFileProxyServer | Sort-Object -Property Name) { + Section -Style Heading4 $LocalizedData.NASHeading { + $OutObj = @() + if ($InfoLevel.Infrastructure.Proxy -eq 1) { + Write-PScriboMessage "Backup Proxy InfoLevel set at $($InfoLevel.Infrastructure.Proxy)." + Write-PScriboMessage 'Collecting Summary Information.' + foreach ($BackupProxy in $BackupProxies) { + try { + + $inObj = [ordered] @{ + $LocalizedData.Name = $BackupProxy.Server.Name + $LocalizedData.Type = $BackupProxy.Server.Type + $LocalizedData.MaxTasksCount = $BackupProxy.ConcurrentTaskNumber + $LocalizedData.Status = switch (($BackupProxy.Server).IsUnavailable) { + 'False' { $LocalizedData.Available } + 'True' { $LocalizedData.Unavailable } + default { ($BackupProxy.Server).IsUnavailable } + } + } + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } catch { + Write-PScriboMessage -IsWarning "NAS / File Backup Proxies $($BackupProxy.Server.Name) Section: $($_.Exception.Message)" + } + } + + if ($HealthCheck.Infrastructure.Proxy) { + $OutObj | Where-Object { $_."$($LocalizedData.Status)" -eq $LocalizedData.Unavailable } | Set-Style -Style Warning -Property $LocalizedData.Status + } + + $TableParams = @{ + Name = "$($LocalizedData.TableHeading) - $VeeamBackupServer" + List = $false + ColumnWidths = 40, 20, 20, 20 + } + + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams + } + } + } + } catch { + Write-PScriboMessage -IsWarning "NAS / File Backup Proxies Section: $($_.Exception.Message)" + } + #---------------------------------------------------------------------------------------------# + # CDP Proxy information Section # + #---------------------------------------------------------------------------------------------# + try { + if ($BackupProxies = Get-VBRCDPProxy | Sort-Object -Property Name) { + Section -Style Heading4 $LocalizedData.CDPHeading { + $OutObj = @() + if ($InfoLevel.Infrastructure.Proxy -eq 1) { + Write-PScriboMessage "Backup Proxy InfoLevel set at $($InfoLevel.Infrastructure.Proxy)." + Write-PScriboMessage 'Collecting Summary Information.' + foreach ($BackupProxy in $BackupProxies) { + try { + + $inObj = [ordered] @{ + $LocalizedData.Name = $BackupProxy.Name + $LocalizedData.CacheSize = "$($BackupProxy.CacheSize) $($BackupProxy.CacheSizeUnit)" + $LocalizedData.CachePath = $BackupProxy.CachePath + $LocalizedData.SourceProxyTrafficPort = $BackupProxy.SourceProxyTrafficPort + $LocalizedData.TargetProxyTrafficPort = $BackupProxy.TargetProxyTrafficPort + $LocalizedData.Status = switch ($BackupProxy.IsEnabled) { + 'False' { $LocalizedData.Unavailable } + 'True' { $LocalizedData.Available } + default { $BackupProxy.IsEnabled } + } + } + $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) + } catch { + Write-PScriboMessage -IsWarning "CDP Backup Proxies $($BackupProxy.Name) Section: $($_.Exception.Message)" + } + } + + if ($HealthCheck.Infrastructure.Proxy) { + $OutObj | Where-Object { $_."$($LocalizedData.Status)" -eq $LocalizedData.Unavailable } | Set-Style -Style Warning -Property $LocalizedData.Status + } + + $TableParams = @{ + Name = "$($LocalizedData.TableHeading) - $VeeamBackupServer" + List = $false + ColumnWidths = 25, 15, 15, 15, 15, 15 + } + + if ($Report.ShowTableCaptions) { + $TableParams['Caption'] = "- $($TableParams.Name)" + } + $OutObj | Table @TableParams + } + } + } + } catch { + Write-PScriboMessage -IsWarning "CDP Backup Proxies Section: $($_.Exception.Message)" + } } } } catch { diff --git a/AsBuiltReport.Veeam.VBR/Src/Private/Report/ConvertTo-HashToYN.ps1 b/AsBuiltReport.Veeam.VBR/Src/Private/Shared/ConvertTo-HashToYN.ps1 similarity index 100% rename from AsBuiltReport.Veeam.VBR/Src/Private/Report/ConvertTo-HashToYN.ps1 rename to AsBuiltReport.Veeam.VBR/Src/Private/Shared/ConvertTo-HashToYN.ps1 diff --git a/AsBuiltReport.Veeam.VBR/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 b/AsBuiltReport.Veeam.VBR/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 index b91f96b..74e4807 100644 --- a/AsBuiltReport.Veeam.VBR/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 +++ b/AsBuiltReport.Veeam.VBR/Src/Public/Invoke-AsBuiltReport.Veeam.VBR.ps1 @@ -28,11 +28,13 @@ function Invoke-AsBuiltReport.Veeam.VBR { [PSCredential] $Credential ) - $IsAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) + if ($PSVersionTable.PSEdition -eq 'Desktop' -or $PSVersionTable.Platform -eq 'Win32NT') { + $IsAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) - if (-not $IsAdmin) { - Write-Error -Message $reportTranslate.InvokeAsBuiltReportVeeamVBR.RunAsAdministrator - break + if (-not $IsAdmin) { + Write-Error -Message $reportTranslate.InvokeAsBuiltReportVeeamVBR.RunAsAdministrator + break + } } if ($psISE) { diff --git a/CHANGELOG.md b/CHANGELOG.md index e396fc2..02b4676 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ##### This project is community maintained and has no sponsorship from Veeam, its employees or any of its affiliates. +## [1.0.7] - Unreleased + +### :arrows_clockwise: Changed + +- Update module version to `v1.0.7` +- Update AsBuiltReport.Diagram module to `v1.0.10` + +### :bug: Fixed + +- Fix [#273](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/273) +- Fix [#268](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/268) +- Fix [#275](https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR/issues/275) +- Fix diagram regex to properly filter PSGraph hidden node bug + ## [1.0.6] - 2026-07-15 ### :arrows_clockwise: Changed diff --git a/README.md b/README.md index dec0fb5..7b1495b 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,7 @@ The table below outlines the default and maximum **InfoLevel** settings for each | Agent | 1 | 2 | | Backup | 1 | 2 | | BackupCopy | 1 | 2 | +| CDP | 1 | 2 | | EntraID | 1 | 2 | | FileShare | 1 | 2 | | Nutanix | 1 | 2 |