< Back

Get-PrtgTree

Sun Jan 19, 2020 5:42 pm

NAME Get-PrtgTree



SYNOPSIS

Retrieves a PRTG Tree for a PRTG Object.





SYNTAX

Get-PrtgTree [-Lazy <SwitchParameter>] [-Object <SensorOrDeviceOrGroupOrProbe>] [-Options {Sensors | Devices |

Groups | Probes | Properties | Triggers | Common | All}] [<CommonParameters>]



Get-PrtgTree -Id <int> [-Lazy <SwitchParameter>] [-Options {Sensors | Devices | Groups | Probes | Properties |

Triggers | Common | All}] [<CommonParameters>]





DESCRIPTION

The Get-PrtgTree cmdlet retrieves a PRTG Tree for a PRTG Object. Get-PrtgTree will recurse all children of a

specified object to construct a hierarchy of nodes representing the specified object and all of its descendants.

PRTG Node Trees can then be further manipulated using various extension methods, or passed to additional PRTG Tree

cmdlets for further processing.





PARAMETERS

-Object <SensorOrDeviceOrGroupOrProbe>

The object to construct a tree for.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Options <TreeParseOption[]>

Specifies the types of descendants to include when constructing a PrtgNode tree. If no value is specified,

Common will be used.



Possible values: Sensors, Devices, Groups, Probes, Properties, Triggers, Common, All



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Id <int>

The ID of the object to construct a tree for.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-Lazy <SwitchParameter>

Specifies that child nodes should be retrieved lazily on demand rather than synchronously all at once.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

PrtgAPI.SensorOrDeviceOrGroupOrProbe

The object to construct a tree for.





OUTPUTS



---------- EXAMPLE 1 ----------



C:\\> Get-PrtgTree



Construct a PRTG Tree from the Root Object (ID: 0).



---------- EXAMPLE 2 ----------



C:\\> Get-Probe -Id 1 | Get-PrtgTree



Construct a PRTG Tree from the Probe with ID 1.



---------- EXAMPLE 3 ----------



C:\\> Get-PrtgTree -Id 1



Construct a PRTG Tree from the object with ID 1.



RELATED LINKS

Online version: https://github.com/lordmilko/PrtgAPI/wi ... powershell

Show-PrtgTree