Skip to content

New-LMDeviceSDT

Syntax

OneTime-DeviceName

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

OneTime-DeviceId

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

Weekly-DeviceId

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

MonthlyByWeek-DeviceId

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

Monthly-DeviceId

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

Daily-DeviceId

Terminal window
New-LMDeviceSDT -Comment <String> -DeviceId <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32>
-EndMinute <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]

Weekly-DeviceName

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

MonthlyByWeek-DeviceName

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

Monthly-DeviceName

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

Daily-DeviceName

Terminal window
New-LMDeviceSDT -Comment <String> -DeviceName <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32>
-EndMinute <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

The New-LMDeviceSDT function creates a new SDT for a Logic Monitor device. It allows you to specify the comment, start date, end date, timezone, and device ID or device name.

Examples

Example 1

Terminal window
New-LMDeviceSDT -Comment "Maintenance window" -StartDate "2022-01-01 00:00:00" -EndDate "2022-01-01 06:00:00" -DeviceId "12345"
Creates a one-time SDT for the device with ID "12345".

Parameters

-Comment

Specifies the comment for the 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 and time for the SDT. This parameter is mandatory when using the ‘OneTime-DeviceId’ or ‘OneTime-DeviceName’ parameter sets.

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

-EndDate

Specifies the end date and time for the SDT. This parameter is mandatory when using the ‘OneTime-DeviceId’ or ‘OneTime-DeviceName’ parameter sets.

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

-DeviceId

Specifies the ID of the device. This parameter is mandatory when using ID-based parameter sets.

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

-DeviceName

Specifies the name of the device. This parameter is mandatory when using name-based parameter sets.

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

-StartHour

Specifies the start hour for recurring SDTs. This parameter is mandatory when using recurring parameter sets. Must be between 0 and 23.

Type: Int32
Parameter Sets: Weekly-DeviceId, MonthlyByWeek-DeviceId, Monthly-DeviceId, Daily-DeviceId, Weekly-DeviceName, MonthlyByWeek-DeviceName, Monthly-DeviceName, Daily-DeviceName
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-StartMinute

Specifies the start minute for recurring SDTs. This parameter is mandatory when using recurring parameter sets. Must be between 0 and 59.

Type: Int32
Parameter Sets: Weekly-DeviceId, MonthlyByWeek-DeviceId, Monthly-DeviceId, Daily-DeviceId, Weekly-DeviceName, MonthlyByWeek-DeviceName, Monthly-DeviceName, Daily-DeviceName
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-EndHour

Specifies the end hour for recurring SDTs. This parameter is mandatory when using recurring parameter sets. Must be between 0 and 23.

Type: Int32
Parameter Sets: Weekly-DeviceId, MonthlyByWeek-DeviceId, Monthly-DeviceId, Daily-DeviceId, Weekly-DeviceName, MonthlyByWeek-DeviceName, Monthly-DeviceName, Daily-DeviceName
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-EndMinute

Specifies the end minute for recurring SDTs. This parameter is mandatory when using recurring parameter sets. Must be between 0 and 59.

Type: Int32
Parameter Sets: Weekly-DeviceId, MonthlyByWeek-DeviceId, Monthly-DeviceId, Daily-DeviceId, Weekly-DeviceName, MonthlyByWeek-DeviceName, Monthly-DeviceName, Daily-DeviceName
Aliases:
Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-WeekDay

Specifies the day of the week for weekly or monthly by week SDTs.

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

-WeekOfMonth

Specifies which week of the month for monthly by week SDTs.

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

-DayOfMonth

Specifies the day of the month for monthly SDTs.

Type: Int32
Parameter Sets: Monthly-DeviceId, Monthly-DeviceName
Aliases:
Required: True
Position: Named
Default value: 0
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.