< Back

Move-Object

Sun Jan 19, 2020 5:42 pm

NAME Move-Object



SYNOPSIS

Moves a device or group within the PRTG Object Tree.





SYNTAX

Move-Object [-DestinationId] <int> -Device <Device> [-PassThru <SwitchParameter>] [<CommonParameters>]



Move-Object [-DestinationId] <int> -Group <Group> [-PassThru <SwitchParameter>] [<CommonParameters>]



Move-Object -DestinationId <int> -Id <int> [-PassThru <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

The Move-Object cmdlet allows you to move a device or group to another group or probe within PRTG. Any device or

group can be moved to any other group or probe, with the exception of special objects such as the "Probe Device"

object under each probe, as well as the Root group (ID: 0).



For object types not yet supported by Move-Object, an -Id can be specified pointing to any valid PRTG object. If a

source/destination ID combination is specified that is not valid (such as placing a device under a sensor) an

error will be thrown.





PARAMETERS

-Device <Device>

The device to move to another group or probe.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Group <Group>

The group to move to another group or probe.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Id <int>

The ID of the object to move.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-SourceId <int>

The ID of the object to move.



This is an alias of the Id parameter.



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-DestinationId <int>

The group or probe to move the object to. This cannot be the Root PRTG Group.



Required? true

Position? 0

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

The device to move to another group or probe.



PrtgAPI.Group

The group to move to another group or probe.





OUTPUTS



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



C:\\> Get-Device dc-1 | Move-Object 5678



Move all devices named dc-1 to under the object with ID 5678



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



C:\\> Move-Object -Id 1001 -DestinationId 2002



Move the object with ID 1001 to under the object with ID 2002



RELATED LINKS

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

Get-Device

Get-Group