New-LMDeviceDatasourceSDT
Syntax
OneTime
New-LMDeviceDatasourceSDT -Comment <String> -StartDate <DateTime> -EndDate <DateTime> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Weekly
New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
MonthlyByWeek
New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -WeekOfMonth <String> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Monthly
New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DayOfMonth <Int32> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Daily
New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
The New-LMDeviceDatasourceSDT function creates a new device datasource SDT (Scheduled Downtime) in Logic Monitor. It allows you to specify the comment, start date and time, end date and time, and the timezone for the SDT.
Examples
Example 1
New-LMDeviceDatasourceSDT -Comment "Maintenance window" -StartDate "2022-01-01 00:00" -EndDate "2022-01-01 06:00" -StartHour 2 -StartMinute 30 -DeviceDataSourceId 123Creates a new one-time device datasource SDT with a comment "Maintenance window" starting on January 1, 2022, at 00:00 and ending on the same day at 06:00.
Example 2
New-LMDeviceDatasourceSDT -Comment "Daily maintenance" -StartHour 3 -StartMinute 0 -ParameterSet Daily -DeviceDataSourceId 123Creates a new daily device datasource SDT with a comment "Daily maintenance" starting at 03:00.
Example 3
New-LMDeviceDatasourceSDT -Comment "Monthly maintenance" -StartHour 8 -StartMinute 30 -ParameterSet Monthly -DeviceDataSourceId 123Creates a new monthly device datasource SDT with a comment "Monthly maintenance" starting on the 1st day of each month at 08:30.
Example 4
New-LMDeviceDatasourceSDT -Comment "Weekly maintenance" -StartHour 10 -StartMinute 0 -ParameterSet Weekly -DeviceDataSourceId 123Creates a new weekly device datasource SDT with a comment "Weekly maintenance" starting every Monday at 10:00.
Parameters
-Comment
The comment for the SDT. This parameter is mandatory.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-StartDate
The start date for the SDT. This parameter is mandatory when using the ‘OneTime’ parameter set.
Type: DateTimeParameter Sets: OneTimeAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-EndDate
The end date for the SDT. This parameter is mandatory when using the ‘OneTime’ parameter set.
Type: DateTimeParameter Sets: OneTimeAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-StartHour
The start hour for the SDT. This parameter is mandatory when using the ‘Daily’, ‘Monthly’, ‘MonthlyByWeek’, or ‘Weekly’ parameter sets. Must be a value between 0 and 23.
Type: Int32Parameter Sets: Weekly, MonthlyByWeek, Monthly, DailyAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-StartMinute
The start minute for the SDT. This parameter is mandatory when using the ‘Daily’, ‘Monthly’, ‘MonthlyByWeek’, or ‘Weekly’ parameter sets. Must be a value between 0 and 59.
Type: Int32Parameter Sets: Weekly, MonthlyByWeek, Monthly, DailyAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-EndHour
The end hour for the SDT. This parameter is mandatory when using the ‘Daily’, ‘Monthly’, ‘MonthlyByWeek’, or ‘Weekly’ parameter sets. Must be a value between 0 and 23.
Type: Int32Parameter Sets: Weekly, MonthlyByWeek, Monthly, DailyAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-EndMinute
The end minute for the SDT. This parameter is mandatory when using the ‘Daily’, ‘Monthly’, ‘MonthlyByWeek’, or ‘Weekly’ parameter sets. Must be a value between 0 and 59.
Type: Int32Parameter Sets: Weekly, MonthlyByWeek, Monthly, DailyAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-WeekDay
The day of the week for the SDT. This parameter is mandatory when using the ‘Weekly’ or ‘MonthlyByWeek’ parameter sets.
Type: StringParameter Sets: Weekly, MonthlyByWeekAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-WeekOfMonth
The week of the month for the SDT. This parameter is mandatory when using the ‘MonthlyByWeek’ parameter set.
Type: StringParameter Sets: MonthlyByWeekAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DayOfMonth
The day of the month for the SDT. This parameter is mandatory when using the ‘Monthly’ parameter set.
Type: Int32Parameter Sets: MonthlyAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-DeviceDataSourceId
The ID of the device datasource for which to create the SDT.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept 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.