New-LMDeviceDatasourceInstanceSDT
Syntax
OneTime
New-LMDeviceDatasourceInstanceSDT -Comment <String> -StartDate <DateTime> -EndDate <DateTime> -DeviceDataSourceInstanceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Weekly
New-LMDeviceDatasourceInstanceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -DeviceDataSourceInstanceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
MonthlyByWeek
New-LMDeviceDatasourceInstanceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -WeekOfMonth <String> -DeviceDataSourceInstanceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Monthly
New-LMDeviceDatasourceInstanceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DayOfMonth <Int32> -DeviceDataSourceInstanceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Daily
New-LMDeviceDatasourceInstanceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DeviceDataSourceInstanceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Description
The New-LMDeviceDatasourceInstanceSDT function creates a new SDT entry for an instance of a Logic Monitor device datasource. It allows you to specify various parameters such as comment, start date, end date, timezone, start hour, and start minute.
Examples
Example 1
New-LMDeviceDatasourceInstanceSDT -Comment "Test SDT Instance" -StartDate (Get-Date) -EndDate (Get-Date).AddDays(7) -StartHour 8 -StartMinute 30 -DeviceDataSourceInstanceId 1234Creates a new one-time instance SDT with a comment, start date, end date, start hour, and start minute.
Parameters
-Comment
Specifies the comment for the new instance SDT.
Type: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-StartDate
Specifies the start date for the new instance 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
Specifies the end date for the new instance 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
Specifies the start hour for the new instance SDT. This parameter is mandatory when using the ‘Daily’, ‘Monthly’, ‘MonthlyByWeek’, or ‘Weekly’ parameter sets. The value must be between 0 and 23.
Type: Int32Parameter Sets: Weekly, MonthlyByWeek, Monthly, DailyAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-StartMinute
Specifies the start minute for the new instance SDT. This parameter is mandatory when using the ‘Daily’, ‘Monthly’, ‘MonthlyByWeek’, or ‘Weekly’ parameter sets. The value must be between 0 and 59.
Type: Int32Parameter Sets: Weekly, MonthlyByWeek, Monthly, DailyAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-EndHour
Specifies the end hour for the new instance SDT. This parameter is mandatory when using the ‘Daily’, ‘Monthly’, ‘MonthlyByWeek’, or ‘Weekly’ parameter sets. The value must be between 0 and 23.
Type: Int32Parameter Sets: Weekly, MonthlyByWeek, Monthly, DailyAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-EndMinute
Specifies the end minute for the new instance SDT. This parameter is mandatory when using the ‘Daily’, ‘Monthly’, ‘MonthlyByWeek’, or ‘Weekly’ parameter sets. The value must be between 0 and 59.
Type: Int32Parameter Sets: Weekly, MonthlyByWeek, Monthly, DailyAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-WeekDay
Specifies the day of the week for the new instance 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
Specifies the week of the month for the new instance 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
Specifies the day of the month for the new instance 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
-DeviceDataSourceInstanceId
Specifies the ID of the device datasource instance 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.