Skip to content

New-LMDeviceDatasourceInstanceSDT

Syntax

OneTime

Terminal window
New-LMDeviceDatasourceInstanceSDT -Comment <String> -StartDate <DateTime> -EndDate <DateTime>
-DeviceDataSourceInstanceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]

Weekly

Terminal window
New-LMDeviceDatasourceInstanceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32>
-EndMinute <Int32> -WeekDay <String> -DeviceDataSourceInstanceId <String> [-ProgressAction <ActionPreference>]
[<CommonParameters>]

MonthlyByWeek

Terminal window
New-LMDeviceDatasourceInstanceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32>
-EndMinute <Int32> -WeekDay <String> -WeekOfMonth <String> -DeviceDataSourceInstanceId <String>
[-ProgressAction <ActionPreference>] [<CommonParameters>]

Monthly

Terminal window
New-LMDeviceDatasourceInstanceSDT -Comment <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32>
-EndMinute <Int32> -DayOfMonth <Int32> -DeviceDataSourceInstanceId <String>
[-ProgressAction <ActionPreference>] [<CommonParameters>]

Daily

Terminal window
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

Terminal window
New-LMDeviceDatasourceInstanceSDT -Comment "Test SDT Instance" -StartDate (Get-Date) -EndDate (Get-Date).AddDays(7) -StartHour 8 -StartMinute 30 -DeviceDataSourceInstanceId 1234
Creates 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: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartDate

Specifies the start date for the new instance 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

-EndDate

Specifies the end date for the new instance 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

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

-DeviceDataSourceInstanceId

Specifies the ID of the device datasource instance 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

-ProgressAction

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

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.