New-Diagrammer
SYNOPSIS
Diagram the configuration of IT infrastructure in PDF/SVG/DOT/PNG formats using PSGraph and Graphviz.
SYNTAX
Credential (Default)
New-Diagrammer [-InputObject] <Object> [[-Format] <Array>] [-Edgecolor <String>] [-EdgeArrowSize <String>]
[-EdgeLineWidth <String>] [-Fontcolor <String>] [-Fontname <String>] [-MainDiagramLabelFontBold]
[-MainDiagramLabelFontItalic] [-MainDiagramLabelFontUnderline] [-MainDiagramLabelFontOverline]
[-MainDiagramLabelFontSubscript] [-MainDiagramLabelFontSuperscript] [-MainDiagramLabelFontStrikeThrough]
[-NodeFontSize <String>] [-NodeFontcolor <String>] [[-IconPath] <FileInfo>] [[-ImagesObj] <Hashtable>]
[-Direction <String>] [-OutputFolderPath <String>] [-SignatureLogo <String>] [-SignatureLogoName <String>]
[-Logo <String>] [-LogoName <String>] [-Filename <String>] [-EdgeType <String>] [-NodeSeparation <String>]
[-SectionSeparation <String>] [-DraftMode] [-EnableErrorDebug] [-DisableMainDiagramLogo]
[-AuthorName <String>] [-CompanyName <String>] [-Signature] -MainDiagramLabel <String>
[-MainDiagramLabelFontsize <Int32>] [-MainDiagramLabelFontname <String>] [-MainDiagramLabelFontColor <String>]
[-MainGraphAttributes <Hashtable>] [-WaterMarkColor <String>] [-WaterMarkText <String>]
[-WaterMarkFontOpacity <Int32>] [-MainGraphBGColor <String>] [-MainGraphSize <String>]
[-MainGraphLogoSizePercent <Int32>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
- None
DESCRIPTION
This cmdlet generates diagrams of IT infrastructure configurations in various formats such as PDF, SVG, DOT, and PNG using PSGraph and Graphviz. It provides extensive customization options for diagram appearance, including font settings, colors, node and edge properties, and more.
EXAMPLES
Example 1
This command generates a new diagram from the specified input object and saves it as a PDF file in the specified output folder.
PARAMETERS
-AuthorName
Sets the footer signature author name.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-CompanyName
Sets the footer signature company name.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Direction
Specifies the direction in which resources are plotted on the visualization. Supported values are 'left-to-right' and 'top-to-bottom'. Default is 'top-to-bottom'.
Type: System.String
DefaultValue: top-to-bottom
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-DisableMainDiagramLogo
Switch to disable rendering the main diagram logo.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-DraftMode
Enables subgraph visualization debugging of subgraph, edges & nodes.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-EdgeArrowSize
Specifies the size of the edge arrows. Default is 1.
Type: System.String
DefaultValue: 1
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Edgecolor
Specifies the color of the edge lines in RGB format (e.g., #FFFFFF). Default is #71797E.
Type: System.String
DefaultValue: '#71797E'
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-EdgeLineWidth
Specifies the width of the edge lines. Default is 3.
Type: System.String
DefaultValue: 3
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-EdgeType
Specifies how edge lines appear in the visualization. Supported values are 'polyline', 'curved', 'ortho', 'line', and 'spline'. Default is 'line'.
Type: System.String
DefaultValue: line
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-EnableErrorDebug
Enables error debugging.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Filename
Specifies a filename for the diagram.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Fontcolor
Specifies the color of the diagram font in RGB format (e.g., #FFFFFF) or color string. Default is #565656.
Type: System.String
DefaultValue: '#565656'
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Fontname
Specifies the name of the font used in the diagram. Default is 'Segoe Ui'.
Type: System.String
DefaultValue: Segoe Ui
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Format
Specifies the output format of the diagram. Supported formats are PDF, PNG, DOT, SVG, and base64. Default is 'pdf'.
Type: System.Array
DefaultValue: pdf
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-IconPath
Specifies the path to the icon file.
Type: System.IO.FileInfo
DefaultValue: (Join-Path (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent) 'Icons')
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ImagesObj
Hashtable with the IconName > IconPath translation.
Type: System.Collections.Hashtable
DefaultValue: >-
@{
"Main_Logo" = "Diagrammer.png"
"Logo_Footer" = "Diagrammer_footer.png"
}
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 4
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-InputObject
The PSGraph input object to be used for generating the diagram.
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Logo
Specifies the path to the custom logo.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-LogoName
Specifies the name of the main diagram logo (must be defined in $ImageObj).
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-MainDiagramLabel
Sets the main label used at the top of the diagram.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-MainDiagramLabelFontColor
Sets the font color of the main label used at the top of the diagram. Default is #565656.
Type: System.String
DefaultValue: '#565656'
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-MainDiagramLabelFontname
Sets the font name of the main label used at the top of the diagram. Default is 'Segoe Ui'.
Type: System.String
DefaultValue: Segoe Ui
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-MainDiagramLabelFontsize
Sets the font size of the main label used at the top of the diagram. Default is 24.
Type: System.Int32
DefaultValue: 24
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-MainDiagramLabelFontStrikeThrough
Switch to render the main diagram label with strikethrough.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-MainDiagramLabelFontSubscript
Switch to render part of the main diagram label as subscript.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-MainDiagramLabelFontSuperscript
Switch to render part of the main diagram label as superscript.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-MainDiagramLabelFontUnderline
Switch to render the main diagram label with underline.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-MainGraphAttributes
Provides a hashtable with general graph attributes (fontname, fontcolor, imagepath, style, imagepath).
Type: System.Collections.Hashtable
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-MainGraphBGColor
Specifies the background color of the diagram. Default is 'White'.
Type: System.String
DefaultValue: White
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-MainGraphLogoSizePercent
Set the image size in percent (100% is default)
Type: System.Int32
DefaultValue: 100
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-MainGraphSize
Specifies the image resolution size. (e.g., 8,11! = 800x1100 pixels) Default = None.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-NodeFontcolor
Specifies the color of the node font in RGB format (e.g., #FFFFFF) or color string. Default is 'Black'.
Type: System.String
DefaultValue: Black
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-NodeFontSize
Specifies the font size of the nodes. Default is 14.
Type: System.String
DefaultValue: 14
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-NodeSeparation
Controls the node separation ratio in the visualization. Default is 0.60.
Type: System.String
DefaultValue: 0.6
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-OutputFolderPath
Specifies the folder path to save the diagram. Default is the system temporary path.
Type: System.String
DefaultValue: '[System.IO.Path]::GetTempPath()'
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-SectionSeparation
Controls the section (subgraph) separation ratio in the visualization. Default is 0.75.
Type: System.String
DefaultValue: 0.75
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Signature
Enables the creation of a footer signature. AuthorName and CompanyName must be set to use this property.
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-SignatureLogo
Specifies the path to the custom logo used for the signature.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-SignatureLogoName
Specifies the name of the signature logo (must be defined in $ImageObj).
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-WaterMarkColor
Specifies the color of the watermark text. Default is 'DarkGray'.
Type: System.String
DefaultValue: DarkGray
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-WaterMarkFontOpacity
The font opacity of the watermark text. The default opacity is 30. This parameter is optional.
Type: System.Int32
DefaultValue: 30
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-WaterMarkText
Specifies the text for the watermark.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
System.Object
A representation of the newly created diagram.
NOTES
Version: 0.2.30
Author(s): Jonathan Colon
Bluesky: @jcolonfpr.bsky.social
Github: rebelinux
Credits: Kevin Marquette (@KevinMarquette) - PSGraph module
Prateek Singh (@PrateekKumarSingh) - AzViz module