Skip to content

New-LMDeviceDatasourceSDT

Terminal window
New-LMDeviceDatasourceSDT -Comment <String> -StartDate <DateTime> -EndDate <DateTime>
-DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32>
-EndMinute <Int32> -WeekDay <String> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>]
[-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32>
-EndMinute <Int32> -WeekDay <String> -WeekOfMonth <String> -DeviceDataSourceId <String>
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32>
-EndMinute <Int32> -DayOfMonth <Int32> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>]
[-WhatIf] [-Confirm] [<CommonParameters>]
Terminal window
New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32>
-EndMinute <Int32> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm]
[<CommonParameters>]

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.

Terminal window
New-LMDeviceDatasourceSDT -Comment "Maintenance window" -StartDate "2022-01-01 00:00" -EndDate "2022-01-01 06:00" -StartHour 2 -StartMinute 30 -DeviceDataSourceId 123
Creates 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.
Terminal window
New-LMDeviceDatasourceSDT -Comment "Daily maintenance" -StartHour 3 -StartMinute 0 -ParameterSet Daily -DeviceDataSourceId 123
Creates a new daily device datasource SDT with a comment "Daily maintenance" starting at 03:00.
Terminal window
New-LMDeviceDatasourceSDT -Comment "Monthly maintenance" -StartHour 8 -StartMinute 30 -ParameterSet Monthly -DeviceDataSourceId 123
Creates a new monthly device datasource SDT with a comment "Monthly maintenance" starting on the 1st day of each month at 08:30.
Terminal window
New-LMDeviceDatasourceSDT -Comment "Weekly maintenance" -StartHour 10 -StartMinute 0 -ParameterSet Weekly -DeviceDataSourceId 123
Creates a new weekly device datasource SDT with a comment "Weekly maintenance" starting every Monday at 10:00.

The comment for the SDT. This parameter is mandatory.

Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The start date for the SDT. This parameter is mandatory when using the ‘OneTime’ parameter set.

Type: DateTime
Parameter Sets: OneTime
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The end date for the SDT. This parameter is mandatory when using the ‘OneTime’ parameter set.

Type: DateTime
Parameter Sets: OneTime
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

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: Int32
Parameter Sets: Weekly, MonthlyByWeek, Monthly, Daily
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

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: Int32
Parameter Sets: Weekly, MonthlyByWeek, Monthly, Daily
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

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: Int32
Parameter Sets: Weekly, MonthlyByWeek, Monthly, Daily
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

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: Int32
Parameter Sets: Weekly, MonthlyByWeek, Monthly, Daily
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

The day of the week for the SDT. This parameter is mandatory when using the ‘Weekly’ or ‘MonthlyByWeek’ parameter sets.

Type: String
Parameter Sets: Weekly, MonthlyByWeek
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The week of the month for the SDT. This parameter is mandatory when using the ‘MonthlyByWeek’ parameter set.

Type: String
Parameter Sets: MonthlyByWeek
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The day of the month for the SDT. This parameter is mandatory when using the ‘Monthly’ parameter set.

Type: Int32
Parameter Sets: Monthly
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

The ID of the device datasource for which to create the SDT.

Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Fill ProgressAction Description

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

None. You cannot pipe objects to this command.

Section titled “None. You cannot pipe objects to this command.”

You must run Connect-LMAccount before running this command.