Src/Private/Get-DiagBackupToFileProxy.ps1
function Get-DiagBackupToFileProxy { <# .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: 0.6.18 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux .LINK https://github.com/rebelinux/Veeam.Diagrammer #> [CmdletBinding()] Param ( ) begin { # Get Veeam Backup Server Object Get-DiagBackupServer } process { try { $FileBackupProxy = Get-VbrBackupProxyInfo -Type 'nas' if ($BackupServerInfo) { if ($FileBackupProxy) { $columnSize = & { if (($FileBackupProxy | Measure-Object).count-le 1 ) { return 1 } else { return 4 } } Node FileProxies @{Label = (Get-DiaHTMLNodeTable -ImagesObj $Images -inputObject ($FileBackupProxy | ForEach-Object { $_.Name.split('.')[0] }) -Align "Center" -iconType "VBR_Proxy_Server" -columnSize $columnSize -IconDebug $IconDebug -MultiIcon -AditionalInfo $FileBackupProxy.AditionalInfo -Subgraph -SubgraphIconType "VBR_Proxy" -SubgraphLabel "File Backup Proxies" -SubgraphLabelPos "top" -SubgraphTableStyle "dashed,rounded" -fontColor $Fontcolor -TableBorderColor $Edgecolor -TableBorder "1"); shape = 'plain'; fontsize = 14; fontname = "Segoe Ui" } Edge $BackupServerInfo.Name -To FileProxies @{minlen = 3 } } } } catch { Write-Verbose -Message $_.Exception.Message } } end {} } |