< Back
Confirm-Sensor
Post
NAME Confirm-Sensor
SYNOPSIS
Marks a Down sensor as DownAcknowledged.
SYNTAX
Confirm-Sensor -Duration <int> -Sensor <Sensor> [-Batch <SwitchParameter>] [-Message <string>] [-PassThru
<SwitchParameter>] [<CommonParameters>]
Confirm-Sensor -Sensor <Sensor> -Until <DateTime> [-Batch <SwitchParameter>] [-Message <string>] [-PassThru
<SwitchParameter>] [<CommonParameters>]
Confirm-Sensor -Forever <SwitchParameter> -Sensor <Sensor> [-Batch <SwitchParameter>] [-Message <string>]
[-PassThru <SwitchParameter>] [<CommonParameters>]
Confirm-Sensor -Duration <int> -Id <int[]> [-Batch <SwitchParameter>] [-Message <string>] [-PassThru
<SwitchParameter>] [<CommonParameters>]
Confirm-Sensor -Id <int[]> -Until <DateTime> [-Batch <SwitchParameter>] [-Message <string>] [-PassThru
<SwitchParameter>] [<CommonParameters>]
Confirm-Sensor -Forever <SwitchParameter> -Id <int[]> [-Batch <SwitchParameter>] [-Message <string>] [-PassThru
<SwitchParameter>] [<CommonParameters>]
DESCRIPTION
The Acknowledge-Sensor cmdlet acknowledges a sensor that is currently in a 'Down' state. When a sensor is
acknowledged, it no longer generates notification triggers and is moved from the 'Down' sensors page to the 'Down
(Acknowledged)' sensors page.
When acknowledging a sensor, you must specify how long to acknowledge the sensor for. If the sensor is still in a
down state when the acknowledgement period expires, the sensor will return to a Down state. While in a Down
(Acknowledged) state PRTG will continue refreshing the sensor according to its scanning interval. If at any time
the requisite conditions are met for the sensor to enter an 'Up' state, the sensor will turn 'Up' and no further
action will be required. If an acknowledged sensor that has gone Up fails and returns to a Down state, the sensor
will need to be re-acknowledged.
If a sensor is continually flapping, it may be better to pause the sensor rather than acknowledge it. For more
information on pausing objects, see Pause-Object.
By default, Acknowledge-Sensor will operate in Batch Mode. In Batch Mode, Acknowledge-Sensor will not execute a
request for each individual object, but will rather store each item in a queue to acknowledge all objects at once,
via a single request. This allows PrtgAPI to be extremely performant in performing operations against a large
number of objects.
If the pipeline is cancelled (either due to a cmdlet throwing an exception or the user pressing Ctrl-C) before
fully completing, Acknowledge-Sensor will not generate a request against PRTG. If you wish to disable Batch Mode
and fully process objects individually one at a time, this can be achieved by specifying -Batch:$false.
PARAMETERS
-Sensor <Sensor>
The sensor to acknowledge.
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Id <int[]>
ID of the sensor to acknowledge.
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-SensorId <int[]>
ID of the sensor to acknowledge.
This is an alias of the Id parameter.
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Duration <int>
The duration to acknowledge the sensor for, in minutes.
Required? true
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Until <DateTime>
The datetime at which the object should become unacknowledged.
Required? true
Position? named
Default value 1/1/0001 12:00:00 AM
Accept pipeline input? false
Accept wildcard characters? false
-Forever <SwitchParameter>
Indicates the object should be acknowledged indefinitely.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Message <string>
A message to display on the object indicating the reason it is acknowledged.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Batch <SwitchParameter>
Specifies whether this cmdlet should queue all objects piped to this cmdlet to execute a single request
against PRTG for processing all objects. By default this value is true.
Required? false
Position? named
Default value True
Accept pipeline input? false
Accept wildcard characters? false
-PassThru <SwitchParameter>
Specifies whether to return the original PrtgObject 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.Sensor
The sensor to acknowledge.
System.Int32[]
ID of the sensor to acknowledge.
OUTPUTS
---------- EXAMPLE 1 ----------
C:\\> Get-Sensor -Status Down | Acknowledge-Sensor -Duration 60
Acknowledge all down sensors for the next 60 minutes
---------- EXAMPLE 2 ----------
C:\\> Get-Sensor -Status Down | Acknowledge-Sensor -Until (Get-Date).AddDays(30) -Message "Honestly, CBF"
Acknowledge all down sensors for the next 30 days with a message explaining the reason the sensor was acknowledged
---------- EXAMPLE 3 ----------
C:\\> Get-Sensor Ping -Status Down | Acknowledge-Sensor -Forever
Acknowledge all down ping sensors forever (or until they comes back up by themselves)
---------- EXAMPLE 4 ----------
C:\\> Acknowledge-Sensor -Id 1001 -Duration 10
Acknowledge the sensor with ID 1001 for 10 minutes.
RELATED LINKS
Online version: https://github.com/lordmilko/PrtgAPI/wi ... nowledge-1
Get-Sensor
Pause-Object
SYNOPSIS
Marks a Down sensor as DownAcknowledged.
SYNTAX
Confirm-Sensor -Duration <int> -Sensor <Sensor> [-Batch <SwitchParameter>] [-Message <string>] [-PassThru
<SwitchParameter>] [<CommonParameters>]
Confirm-Sensor -Sensor <Sensor> -Until <DateTime> [-Batch <SwitchParameter>] [-Message <string>] [-PassThru
<SwitchParameter>] [<CommonParameters>]
Confirm-Sensor -Forever <SwitchParameter> -Sensor <Sensor> [-Batch <SwitchParameter>] [-Message <string>]
[-PassThru <SwitchParameter>] [<CommonParameters>]
Confirm-Sensor -Duration <int> -Id <int[]> [-Batch <SwitchParameter>] [-Message <string>] [-PassThru
<SwitchParameter>] [<CommonParameters>]
Confirm-Sensor -Id <int[]> -Until <DateTime> [-Batch <SwitchParameter>] [-Message <string>] [-PassThru
<SwitchParameter>] [<CommonParameters>]
Confirm-Sensor -Forever <SwitchParameter> -Id <int[]> [-Batch <SwitchParameter>] [-Message <string>] [-PassThru
<SwitchParameter>] [<CommonParameters>]
DESCRIPTION
The Acknowledge-Sensor cmdlet acknowledges a sensor that is currently in a 'Down' state. When a sensor is
acknowledged, it no longer generates notification triggers and is moved from the 'Down' sensors page to the 'Down
(Acknowledged)' sensors page.
When acknowledging a sensor, you must specify how long to acknowledge the sensor for. If the sensor is still in a
down state when the acknowledgement period expires, the sensor will return to a Down state. While in a Down
(Acknowledged) state PRTG will continue refreshing the sensor according to its scanning interval. If at any time
the requisite conditions are met for the sensor to enter an 'Up' state, the sensor will turn 'Up' and no further
action will be required. If an acknowledged sensor that has gone Up fails and returns to a Down state, the sensor
will need to be re-acknowledged.
If a sensor is continually flapping, it may be better to pause the sensor rather than acknowledge it. For more
information on pausing objects, see Pause-Object.
By default, Acknowledge-Sensor will operate in Batch Mode. In Batch Mode, Acknowledge-Sensor will not execute a
request for each individual object, but will rather store each item in a queue to acknowledge all objects at once,
via a single request. This allows PrtgAPI to be extremely performant in performing operations against a large
number of objects.
If the pipeline is cancelled (either due to a cmdlet throwing an exception or the user pressing Ctrl-C) before
fully completing, Acknowledge-Sensor will not generate a request against PRTG. If you wish to disable Batch Mode
and fully process objects individually one at a time, this can be achieved by specifying -Batch:$false.
PARAMETERS
-Sensor <Sensor>
The sensor to acknowledge.
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Id <int[]>
ID of the sensor to acknowledge.
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-SensorId <int[]>
ID of the sensor to acknowledge.
This is an alias of the Id parameter.
Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Duration <int>
The duration to acknowledge the sensor for, in minutes.
Required? true
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-Until <DateTime>
The datetime at which the object should become unacknowledged.
Required? true
Position? named
Default value 1/1/0001 12:00:00 AM
Accept pipeline input? false
Accept wildcard characters? false
-Forever <SwitchParameter>
Indicates the object should be acknowledged indefinitely.
Required? true
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Message <string>
A message to display on the object indicating the reason it is acknowledged.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Batch <SwitchParameter>
Specifies whether this cmdlet should queue all objects piped to this cmdlet to execute a single request
against PRTG for processing all objects. By default this value is true.
Required? false
Position? named
Default value True
Accept pipeline input? false
Accept wildcard characters? false
-PassThru <SwitchParameter>
Specifies whether to return the original PrtgObject 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.Sensor
The sensor to acknowledge.
System.Int32[]
ID of the sensor to acknowledge.
OUTPUTS
---------- EXAMPLE 1 ----------
C:\\> Get-Sensor -Status Down | Acknowledge-Sensor -Duration 60
Acknowledge all down sensors for the next 60 minutes
---------- EXAMPLE 2 ----------
C:\\> Get-Sensor -Status Down | Acknowledge-Sensor -Until (Get-Date).AddDays(30) -Message "Honestly, CBF"
Acknowledge all down sensors for the next 30 days with a message explaining the reason the sensor was acknowledged
---------- EXAMPLE 3 ----------
C:\\> Get-Sensor Ping -Status Down | Acknowledge-Sensor -Forever
Acknowledge all down ping sensors forever (or until they comes back up by themselves)
---------- EXAMPLE 4 ----------
C:\\> Acknowledge-Sensor -Id 1001 -Duration 10
Acknowledge the sensor with ID 1001 for 10 minutes.
RELATED LINKS
Online version: https://github.com/lordmilko/PrtgAPI/wi ... nowledge-1
Get-Sensor
Pause-Object