New-LMDeviceSDT
Syntax
OneTime-DeviceName
New-LMDeviceSDT -Comment <String> -StartDate <DateTime> -EndDate <DateTime> -DeviceName <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
OneTime-DeviceId
New-LMDeviceSDT -Comment <String> -StartDate <DateTime> -EndDate <DateTime> -DeviceId <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Weekly-DeviceId
New-LMDeviceSDT -Comment <String> -DeviceId <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
MonthlyByWeek-DeviceId
New-LMDeviceSDT -Comment <String> -DeviceId <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -WeekOfMonth <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Monthly-DeviceId
New-LMDeviceSDT -Comment <String> -DeviceId <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DayOfMonth <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Daily-DeviceId
New-LMDeviceSDT -Comment <String> -DeviceId <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Weekly-DeviceName
New-LMDeviceSDT -Comment <String> -DeviceName <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
MonthlyByWeek-DeviceName
New-LMDeviceSDT -Comment <String> -DeviceName <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -WeekDay <String> -WeekOfMonth <String> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Monthly-DeviceName
New-LMDeviceSDT -Comment <String> -DeviceName <String> -StartHour <Int32> -StartMinute <Int32> -EndHour <Int32> -EndMinute <Int32> -DayOfMonth <Int32> [-ProgressAction <ActionPreference>] [<CommonParameters>]
Daily-DeviceName
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
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: StringParameter Sets: (All)Aliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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: DateTimeParameter Sets: OneTime-DeviceName, OneTime-DeviceIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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: DateTimeParameter Sets: OneTime-DeviceName, OneTime-DeviceIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DeviceId
Specifies the ID of the device. This parameter is mandatory when using ID-based parameter sets.
Type: StringParameter Sets: OneTime-DeviceId, Weekly-DeviceId, MonthlyByWeek-DeviceId, Monthly-DeviceId, Daily-DeviceIdAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DeviceName
Specifies the name of the device. This parameter is mandatory when using name-based parameter sets.
Type: StringParameter Sets: OneTime-DeviceName, Weekly-DeviceName, MonthlyByWeek-DeviceName, Monthly-DeviceName, Daily-DeviceNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept 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: Int32Parameter Sets: Weekly-DeviceId, MonthlyByWeek-DeviceId, Monthly-DeviceId, Daily-DeviceId, Weekly-DeviceName, MonthlyByWeek-DeviceName, Monthly-DeviceName, Daily-DeviceNameAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept 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: Int32Parameter Sets: Weekly-DeviceId, MonthlyByWeek-DeviceId, Monthly-DeviceId, Daily-DeviceId, Weekly-DeviceName, MonthlyByWeek-DeviceName, Monthly-DeviceName, Daily-DeviceNameAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept 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: Int32Parameter Sets: Weekly-DeviceId, MonthlyByWeek-DeviceId, Monthly-DeviceId, Daily-DeviceId, Weekly-DeviceName, MonthlyByWeek-DeviceName, Monthly-DeviceName, Daily-DeviceNameAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept 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: Int32Parameter Sets: Weekly-DeviceId, MonthlyByWeek-DeviceId, Monthly-DeviceId, Daily-DeviceId, Weekly-DeviceName, MonthlyByWeek-DeviceName, Monthly-DeviceName, Daily-DeviceNameAliases:
Required: TruePosition: NamedDefault value: 0Accept pipeline input: FalseAccept wildcard characters: False
-WeekDay
Specifies the day of the week for weekly or monthly by week SDTs.
Type: StringParameter Sets: Weekly-DeviceId, MonthlyByWeek-DeviceId, Weekly-DeviceName, MonthlyByWeek-DeviceNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-WeekOfMonth
Specifies which week of the month for monthly by week SDTs.
Type: StringParameter Sets: MonthlyByWeek-DeviceId, MonthlyByWeek-DeviceNameAliases:
Required: TruePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False
-DayOfMonth
Specifies the day of the month for monthly SDTs.
Type: Int32Parameter Sets: Monthly-DeviceId, Monthly-DeviceNameAliases:
Required: TruePosition: NamedDefault value: 0Accept 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.