< Back

Add-lmSdt

Sat Jan 18, 2020 9:51 am

NAME Add-lmSdt



SYNOPSIS

Adds a scheduled downtime to a thing





SYNTAX

Add-lmSdt -Type <String> -Name <String> -StartTime <DateTimeOffset> -EndTime <DateTimeOffset> [-Comment <String>]

[<CommonParameters>]



Add-lmSdt -Type <String> -Id <Int32> -StartTime <DateTimeOffset> -EndTime <DateTimeOffset> [-Comment <String>]

[<CommonParameters>]





DESCRIPTION

Pop pop





PARAMETERS

-Type <String>

What object you will schedule SDT for



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Id <Int32>

ID of the thing to schedule downtime for



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-Name <String>

Name of the thing to schedule downtime for



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-StartTime <DateTimeOffset>

What time the SDT should start



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-EndTime <DateTimeOffset>

What time the SDT should start



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Comment <String>

A comment to include (Recommended)



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





LogicMonitor cares about capitalization, if it really matters, use ID.



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>#Puts the device named "CORP-DC01" in Scheduled Downtime for the next 3 hours



Add-lmSdt -Type Device -Name CORP-DC01 -StartTime (Get-Date) -EndTime ((Get-Date).AddHours(3)) -Comment "DC is

acting up, rebooting and running some diagnostics"









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>#Puts a device in SDT by id for 3 hours at midnight the first of next month.



Add-lmSdt -Type Device -Id 966 -StartTime (Get-Date -day 1 -Hour 0 -minute 0 -second 0).AddMonths(1) -EndTime

(Get-Date -day 1 -Hour 3 -minute 0 -second 0).AddMonths(1)











RELATED LINKS