< Back

Invoke-SortPrtgObject

Sun Jan 19, 2020 5:42 pm

NAME Invoke-SortPrtgObject



SYNOPSIS

Sorts the children of a device, group or probe alphabetically.





SYNTAX

Invoke-SortPrtgObject -Object <DeviceOrGroupOrProbe> [-PassThru <SwitchParameter>] [<CommonParameters>]



Invoke-SortPrtgObject -Id <int> [-PassThru <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

The Sort-PrtgObject cmdlet sorts the children of a specified object alphabetically. In addition to normal devices,

groups and probes, this cmdlet can also be used against the Root group (ID: 0), allowing you to sort probes

alphabetically as well.





PARAMETERS

-Object <DeviceOrGroupOrProbe>

The device, group or probe whose children should be sorted.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Id <int>

ID of the object whose children should be sorted.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-PassThru <SwitchParameter>

Specifies whether to return the original IObject that was passed to this cmdlet, allowing the object to be

further piped into additional cmdlets.



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.DeviceOrGroupOrProbe

The device, group or probe whose children should be sorted.





OUTPUTS



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



C:\\> Get-Group -Id 0 | Sort-PrtgObject



Sort all probes under the root PRTG Group.



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



C:\\> Sort-PrtgObject -Id 0



Sorts all probes under the root PRTG Group.



RELATED LINKS

Online version: https://github.com/lordmilko/PrtgAPI/wi ... #sorting-1

Get-Device

Get-Group

Get-Probe