< Back

Restart-Probe

Sun Jan 19, 2020 5:44 pm

NAME Restart-Probe



SYNOPSIS

Restarts the PRTG Probe Service of PRTG Network Monitor probes.





SYNTAX

Restart-Probe [-Force <SwitchParameter>] [-PassThru <SwitchParameter>] [-Probe <Probe>] [-Timeout <int>] [-Wait

<SwitchParameter>] [<CommonParameters>]



Restart-Probe -Id <int[]> [-Force <SwitchParameter>] [-PassThru <SwitchParameter>] [-Timeout <int>] [-Wait

<SwitchParameter>] [<CommonParameters>]





DESCRIPTION

The Restart-Probe cmdlet restarts the PRTG Probe Service of a specified PRTG Probe. If no probe is specified,

Restart-Probe will restart the PRTG Probe Service of all PRTG Probes in your environment.



When executed, Restart-Probe will prompt to confirm you wish to restart the PRTG Probe Service of each PRTG Probe.

Within this prompt you may respond to each probe individually or answer yes/no to all. To override this prompt

completely, the -Force parameter can be specified.



By default, Restart-Probe will wait for one hour for all probes restart and reconnect to PRTG. If you do not wish

to wait at all, this can be overridden by specifying -Wait:$false. You may additionally specify a custom timeout

duration (in seconds) via the -Timeout parameter. If Restart-Probe times out waiting for a PRTG Probe Service to

restart, a TimeoutException will be thrown specifying the number of probes that failed to restart.





PARAMETERS

-Probe <Probe>

The probe to restart. If no probe is specified, all probes will be restarted.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Id <int[]>

ID of the probe to restart.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ProbeId <int[]>

ID of the probe to restart.



This is an alias of the Id parameter.



Required? true

Position? named

Default value

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



-Force <SwitchParameter>

Forces the PRTG Probe Service to be restarted on all specified probes without displaying a confirmation prompt.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Wait <SwitchParameter>

Wait for the PRTG Core Service to restart before ending the cmdlet. By default this value is true.



Required? false

Position? named

Default value True

Accept pipeline input? false

Accept wildcard characters? false



-Timeout <int>

Duration (in seconds) to wait for the PRTG Probe Service of all probes to restart. Default value is 3600 (1

hour). If Wait is false, this parameter will have no effect.



Required? false

Position? named

Default value 3600

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

The probe to restart. If no probe is specified, all probes will be restarted.





OUTPUTS



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



C:\\> Restart-Probe



Restart all probes on a PRTG Server and wait for them to restart.



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



C:\\> Get-Probe *contoso* | Restart-Probe -Timeout 180 -Force



Restart all probes containing "contoso" in their names, waiting 3 minutes for them to restart, without displaying

a confirmation prompt.



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



C:\\> Get-Probe -Id 2004 | Restart-Probe -Wait:$false



Restart the probe with ID 2004, without waiting for the probe to restart.



---------- EXAMPLE 4 ----------



C:\\> Restart-Probe -Id 1001



Restart the probe with ID 1001. If 1001 is not a valid probe, an error will be thrown.



RELATED LINKS

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

Get-Probe

Restart-PrtgCore