Veeam Diagrammer is a PowerShell module to automatically generate Veeam Backup & Replication topology diagrams by just typing a PowerShell cmdlet and passing the name of the Backup Server.
AzViz
module.Special thanks & shoutout to
Kevin Marquette
and hisPSGraph
module and toPrateek Singh
and hisAzViz
project without it work the Veeam.Diagrammer won't be possible!
Below are the instructions on how to install, configure and generate a Veeam.Diagrammer diagram.
The Veeam.Diagrammer supports the following Veeam Backup & Replication version;
Only users with Veeam Backup Administrator role assigned can generate a Diagram
This project is compatible with the following PowerShell versions;
Windows PowerShell 5.1 | PowerShell 7 |
---|---|
:white_check_mark: | :x: |
PowerShell 5.1, and the following PowerShell modules are required for generating a Veeam.Diagrammer diagram.
Graphviz is open source graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. It has important applications in networking, bioinformatics, software engineering, database and web design, machine learning, and in visual interfaces for other technical domains.
No need to install GraphViz on your system because from now on it's libraries are included in the local module path.
# Install Veeam.Diagrammer from the Powershell Gallery
install-module -Name Veeam.Diagrammer
If you are unable to use the PowerShell Gallery, you can still install the module manually. Ensure you repeat the following steps for the system requirements also.
Download the code package / latest release zip from GitHub
Extract the zip file
Copy the folder Veeam.Diagrammer
to a path that is set in $env:PSModulePath
.
Open a PowerShell terminal window and unblock the downloaded files with
$path = (Get-Module -Name Veeam.Diagrammer -ListAvailable).ModuleBase; Unblock-File -Path $path\*.psd1; Unblock-File -Path $path\Src\Public\*.ps1; Unblock-File -Path $path\Src\Private\*.ps1
Close and reopen the PowerShell terminal window.
Note: You are not limited to installing the module to those example paths, you can add a new entry to the environment variable PSModulePath if you want to use another path.
The New-VeeamDiagram
cmdlet is used to generate a Veeam Backup & Replication diagram. The type of diagram to generate is specified by using the DiagramType
parameter. The DiagramType parameter relies on additional diagram modules being created alongside the defaults module. The Target
parameter specifies one or more Veeam VBR servers on which to connect and run the diagram. User credentials to the system are specified using the Credential
, or the Username
and Password
parameters. One or more document formats, such as PNG
, PDF
, SVG
, BASE64
or DOT
can be specified using the Format
parameter. Additional parameters are outlined below.
.PARAMETER DiagramType
Specifies the type of veeam vbr diagram that will be generated.
The supported output diagrams are:
'Backup-to-Sobr', 'Backup-to-vSphere-Proxy', 'Backup-to-HyperV-Proxy',
'Backup-to-Repository', 'Backup-to-WanAccelerator', 'Backup-to-Tape',
'Backup-to-File-Proxy', 'Backup-to-ProtectedGroup', 'Backup-Infrastructure'
.PARAMETER Target
Specifies the IP/FQDN of the system to connect.
Multiple targets may be specified, separated by a comma.
.PARAMETER Port
Specifies a optional port to connect to Veeam VBR Service.
By default, port will be set to 9392
.PARAMETER Credential
Specifies the stored credential of the target system.
.PARAMETER Username
Specifies the username for the target system.
.PARAMETER Password
Specifies the password for the target system.
.PARAMETER Format
Specifies the output format of the diagram.
The supported output formats are PDF, PNG, DOT & SVG.
Multiple output formats may be specified, separated by a comma.
.PARAMETER Direction
Set the direction in which resource are plotted on the visualization
The supported directions are:
'top-to-bottom', 'left-to-right'
By default, direction will be set to top-to-bottom.
.PARAMETER DiagramType
Use it to set the diagram theme.
The supported themes are:
'Black', 'White', 'Neon'
By default, theme will be set to White.
.PARAMETER NodeSeparation
Controls Node separation ratio in visualization
By default, NodeSeparation will be set to .60.
.PARAMETER SectionSeparation
Controls Section (Subgraph) separation ratio in visualization
By default, NodeSeparation will be set to .75.
.PARAMETER EdgeType
Controls how edges lines appear in visualization
The supported edge type are:
'polyline', 'curved', 'ortho', 'line', 'spline'
By default, EdgeType will be set to spline.
References: https://graphviz.org/docs/attrs/splines/
.PARAMETER OutputFolderPath
Specifies the folder path to save the diagram.
.PARAMETER Filename
Specifies a filename for the diagram.
.PARAMETER EnableEdgeDebug
Control to enable edge debugging ( Dummy Edge and Node lines ).
.PARAMETER EnableSubGraphDebug
Control to enable subgraph debugging ( Subgraph Lines ).
.PARAMETER EnableErrorDebug
Control to enable error debugging.
.PARAMETER AuthorName
Allow to set footer signature Author Name.
.PARAMETER CompanyName
Allow to set footer signature Company Name.
.PARAMETER Logo
Allow to change the Veeam logo to a custom one.
Image should be 400px x 100px or less in size.
.PARAMETER SignatureLogo
Allow to change the Veeam.Diagrammer signature logo to a custom one.
Image should be 120px x 130px or less in size.
.PARAMETER Signature
Allow the creation of footer signature.
AuthorName and CompanyName must be set to use this property.
For a full list of common parameters and examples you can view the New-VeeamDiagram
cmdlet help with the following command;
Get-Help New-VeeamDiagram -Full
There are a few examples listed below on running the Veeam.Diagrammer script against a Veeam Backup Server. Refer to the README.md
file in the main Veeam.Diagrammer project repository for more examples.
# Generate a Veeam.Diagrammer diagram for Backup Server 'veeam-vbr.pharmax.local' using specified credentials. Export report to PDF & PNG formats. Use default report style. Save reports to 'C:\Users\Jon\Documents'
PS C:\> New-VeeamDiagram -DiagramType Backup-to-SOBR -Target veeam-vbr.pharmax.local -Username 'Domain\veeam_admin' -Password 'P@ssw0rd' -Format pdf,png -OutputFolderPath 'C:\Users\Jon\Documents'
# Generate a Veeam.Diagrammer diagram for Backup Server veeam-vbr.pharmax.local using stored credentials. Export report to DOT & SVG formats. Save reports to 'C:\Users\Jon\Documents'.
PS C:\> $Creds = Get-Credential
PS C:\> New-VeeamDiagram -DiagramType Backup-to-SOBR -Target veeam-vbr.pharmax.local -Credential $Creds -Format dot,pdf -OutputFolderPath 'C:\Users\Jon\Documents'