New-LMDeviceGroupSDT
Syntax
OneTime-DeviceGroupName
New-LMDeviceGroupSDT -Comment <String> -StartDate <DateTime> -EndDate <DateTime> -DeviceGroupName <String> [-DataSourceId <String>] [-DataSourceName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
OneTime-DeviceGroupId
New-LMDeviceGroupSDT -Comment <String> -StartDate <DateTime> -EndDate <DateTime> -DeviceGroupId <String> [-DataSourceId <String>] [-DataSourceName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Weekly-DeviceGroupId
New-LMDeviceGroupSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -DeviceGroupId <String> [-DataSourceId <String>] [-DataSourceName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
MonthlyByWeek-DeviceGroupId
New-LMDeviceGroupSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -WeekOfMonth <String> -DeviceGroupId <String> [-DataSourceId <String>] [-DataSourceName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Monthly-DeviceGroupId
New-LMDeviceGroupSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DayOfMonth <Int32> -DeviceGroupId <String> [-DataSourceId <String>] [-DataSourceName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Daily-DeviceGroupId
New-LMDeviceGroupSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DeviceGroupId <String> [-DataSourceId <String>] [-DataSourceName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Weekly-DeviceGroupName
New-LMDeviceGroupSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -DeviceGroupName <String> [-DataSourceId <String>] [-DataSourceName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
MonthlyByWeek-DeviceGroupName
New-LMDeviceGroupSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -WeekOfMonth <String> -DeviceGroupName <String> [-DataSourceId <String>] [-DataSourceName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Monthly-DeviceGroupName
New-LMDeviceGroupSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DayOfMonth <Int32> -DeviceGroupName <String> [-DataSourceId <String>] [-DataSourceName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Daily-DeviceGroupName
New-LMDeviceGroupSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DeviceGroupName <String> [-DataSourceId <String>] [-DataSourceName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
The New-LMDeviceGroupSDT function creates a new scheduled downtime for a LogicMonitor device group. This allows you to temporarily disable monitoring for a specific group of devices within your LogicMonitor account.
Examples
Example 1
New-LMDeviceGroupSDT -Comment "Maintenance window" -StartDate "2022-01-01 00:00:00" -EndDate "2022-01-01 06:00:00" -StartHour 2 -DeviceGroupName "Production Servers"Creates a new scheduled downtime for the "Production Servers" device group.
Parameters
-Comment
Specifies the comment for the scheduled downtime. This comment will be displayed in the LogicMonitor UI.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-StartDate
Specifies the start date and time for the scheduled downtime. This parameter is mandatory when using the ‘OneTime-DeviceGroupId’ or ‘OneTime-DeviceGroupName’ parameter sets.
Type: DateTimeParameter Sets: OneTime-DeviceGroupName, OneTime-DeviceGroupIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-EndDate
Specifies the end date and time for the scheduled downtime. This parameter is mandatory when using the ‘OneTime-DeviceGroupId’ or ‘OneTime-DeviceGroupName’ parameter sets.
Type: DateTimeParameter Sets: OneTime-DeviceGroupName, OneTime-DeviceGroupIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-StartHour
Specifies the start hour for the scheduled downtime. This parameter is mandatory when using recurring parameter sets. The value must be between 0 and 23.
Type: Int32Parameter Sets: Weekly-DeviceGroupId, MonthlyByWeek-DeviceGroupId, Monthly-DeviceGroupId, Daily-DeviceGroupId, Weekly-DeviceGroupName, MonthlyByWeek-DeviceGroupName, Monthly-DeviceGroupName, Daily-DeviceGroupNameAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-StartMinute
Specifies the start minute for the scheduled downtime. This parameter is mandatory when using recurring parameter sets. The value must be between 0 and 59.
Type: Int32Parameter Sets: Weekly-DeviceGroupId, MonthlyByWeek-DeviceGroupId, Monthly-DeviceGroupId, Daily-DeviceGroupId, Weekly-DeviceGroupName, MonthlyByWeek-DeviceGroupName, Monthly-DeviceGroupName, Daily-DeviceGroupNameAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-EndHour
Specifies the end hour for the scheduled downtime. This parameter is mandatory when using recurring parameter sets. The value must be between 0 and 23.
Type: Int32Parameter Sets: Weekly-DeviceGroupId, MonthlyByWeek-DeviceGroupId, Monthly-DeviceGroupId, Daily-DeviceGroupId, Weekly-DeviceGroupName, MonthlyByWeek-DeviceGroupName, Monthly-DeviceGroupName, Daily-DeviceGroupNameAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-EndMinute
Specifies the end minute for the scheduled downtime. This parameter is mandatory when using recurring parameter sets. The value must be between 0 and 59.
Type: Int32Parameter Sets: Weekly-DeviceGroupId, MonthlyByWeek-DeviceGroupId, Monthly-DeviceGroupId, Daily-DeviceGroupId, Weekly-DeviceGroupName, MonthlyByWeek-DeviceGroupName, Monthly-DeviceGroupName, Daily-DeviceGroupNameAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-WeekDay
Specifies the day of the week for weekly or monthly by week SDTs. This parameter is mandatory when using the ‘Weekly’ or ‘MonthlyByWeek’ parameter sets.
Type: StringParameter Sets: Weekly-DeviceGroupId, MonthlyByWeek-DeviceGroupId, Weekly-DeviceGroupName, MonthlyByWeek-DeviceGroupNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-WeekOfMonth
Specifies which week of the month for monthly by week SDTs. This parameter is mandatory when using the ‘MonthlyByWeek’ parameter set.
Type: StringParameter Sets: MonthlyByWeek-DeviceGroupId, MonthlyByWeek-DeviceGroupNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DayOfMonth
Specifies the day of the month for monthly SDTs. This parameter is mandatory when using the ‘Monthly’ parameter set.
Type: Int32Parameter Sets: Monthly-DeviceGroupId, Monthly-DeviceGroupNameAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-DeviceGroupId
Specifies the ID of the device group. This parameter is mandatory when using ID-based parameter sets.
Type: StringParameter Sets: OneTime-DeviceGroupId, Weekly-DeviceGroupId, MonthlyByWeek-DeviceGroupId, Monthly-DeviceGroupId, Daily-DeviceGroupIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DeviceGroupName
Specifies the name of the device group. This parameter is mandatory when using name-based parameter sets.
Type: StringParameter Sets: OneTime-DeviceGroupName, Weekly-DeviceGroupName, MonthlyByWeek-DeviceGroupName, Monthly-DeviceGroupName, Daily-DeviceGroupNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DataSourceId
Fill DataSourceId Description
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-DataSourceName
Fill DataSourceName Description
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: AllAccept pipeline input: FalseAccept wildcard characters: False
-ProgressAction
Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None. You cannot pipe objects to this command.
Outputs
Returns LogicMonitor.SDT object.
Notes
You must run Connect-LMAccount before running this command.