New-LMDeviceDatasourceSDT
Syntax
Section titled “Syntax”OneTime
Section titled “OneTime”New-LMDeviceDatasourceSDT -Comment <String> -StartDate <DateTime> -EndDate <DateTime> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Weekly
Section titled “Weekly”New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]MonthlyByWeek
Section titled “MonthlyByWeek”New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -WeekOfMonth <String> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Monthly
Section titled “Monthly”New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DayOfMonth <Int32> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]New-LMDeviceDatasourceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DeviceDataSourceId <String> [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]Description
Section titled “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
Section titled “Examples”Example 1
Section titled “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
Section titled “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
Section titled “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
Section titled “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
Section titled “Parameters”-Comment
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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
Section titled “-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-WhatIf
Section titled “-WhatIf”Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameterParameter Sets: (All)Aliases: wi
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-Confirm
Section titled “-Confirm”Prompts you for confirmation before running the cmdlet.
Type: SwitchParameterParameter Sets: (All)Aliases: cf
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Fill ProgressAction Description
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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
Section titled “Inputs”None. You cannot pipe objects to this command.
Section titled “None. You cannot pipe objects to this command.”Outputs
Section titled “Outputs”Returns LogicMonitor.SDT object.
Section titled “Returns LogicMonitor.SDT object.”You must run Connect-LMAccount before running this command.