< Back
Get-PrtgSchedule
Post
NAME Get-PrtgSchedule
SYNOPSIS
Retrieves all Monitoring Schedules from a PRTG Server.
SYNTAX
Get-PrtgSchedule [[-Name] <string[]>] [[-Filter] <SearchFilter[]>] [-Count <int>] [-Id <int[]>]
[<CommonParameters>]
DESCRIPTION
The Get-PrtgSchedule cmdlet retrieves all monitoring schedules present on a PRTG Server. Schedules define the
timeframes during which monitoring on sensors can be active. When sensors are deactivated due to schedules, their
statuses will automatically be set to PausedBySchedule.
PARAMETERS
-Id <int[]>
Retrieve an object with a specified ID.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <string[]>
Filter the response to objects with a certain name. Can include wildcards.
Required? false
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Filter <SearchFilter[]>
Filter the response to objects that match one or more criteria.
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Count <int>
Maximum number of results to return. Note: when this parameter is specified wildcard filters such as Name may
behave unexpectedly when wildcard characters are not used and records are being filtered by an additional
property other than ParentId.
Required? false
Position? named
Default value
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.SearchFilter[]
Filter the response to objects that match one or more criteria.
OUTPUTS
PrtgAPI.Schedule
---------- EXAMPLE 1 ----------
C:\\> Get-PrtgSchedule
Get all monitoring schedules.
---------- EXAMPLE 2 ----------
C:\\> Get-PrtgSchedule *night*
Get all monitoring schedules whose name contains "night"
---------- EXAMPLE 3 ----------
C:\\> $schedule = Get-PrtgSchedule -Id 621
C:\\> Get-Sensor -Id 2024 | Set-ObjectProperty -RawParameters @{
>> scheduledependency = 0
>> schedule_ = $schedule
>> }
Apply the schedule with ID 621 to the sensor with ID 2024
RELATED LINKS
Online version: https://github.com/lordmilko/PrtgAPI/wi ... powershell
SYNOPSIS
Retrieves all Monitoring Schedules from a PRTG Server.
SYNTAX
Get-PrtgSchedule [[-Name] <string[]>] [[-Filter] <SearchFilter[]>] [-Count <int>] [-Id <int[]>]
[<CommonParameters>]
DESCRIPTION
The Get-PrtgSchedule cmdlet retrieves all monitoring schedules present on a PRTG Server. Schedules define the
timeframes during which monitoring on sensors can be active. When sensors are deactivated due to schedules, their
statuses will automatically be set to PausedBySchedule.
PARAMETERS
-Id <int[]>
Retrieve an object with a specified ID.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <string[]>
Filter the response to objects with a certain name. Can include wildcards.
Required? false
Position? 0
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Filter <SearchFilter[]>
Filter the response to objects that match one or more criteria.
Required? false
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Count <int>
Maximum number of results to return. Note: when this parameter is specified wildcard filters such as Name may
behave unexpectedly when wildcard characters are not used and records are being filtered by an additional
property other than ParentId.
Required? false
Position? named
Default value
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.SearchFilter[]
Filter the response to objects that match one or more criteria.
OUTPUTS
PrtgAPI.Schedule
---------- EXAMPLE 1 ----------
C:\\> Get-PrtgSchedule
Get all monitoring schedules.
---------- EXAMPLE 2 ----------
C:\\> Get-PrtgSchedule *night*
Get all monitoring schedules whose name contains "night"
---------- EXAMPLE 3 ----------
C:\\> $schedule = Get-PrtgSchedule -Id 621
C:\\> Get-Sensor -Id 2024 | Set-ObjectProperty -RawParameters @{
>> scheduledependency = 0
>> schedule_ = $schedule
>> }
Apply the schedule with ID 621 to the sensor with ID 2024
RELATED LINKS
Online version: https://github.com/lordmilko/PrtgAPI/wi ... powershell