Get-LMRecentlyDeleted
Syntax
Section titled “Syntax”__AllParameterSets
Section titled “__AllParameterSets”Get-LMRecentlyDeleted [[-ResourceType] <string>] [[-DeletedAfter] <datetime>] [[-DeletedBefore] <datetime>] [[-DeletedBy] <string>] [[-BatchSize] <int>] [[-Sort] <string>] [<CommonParameters>]Description
Section titled “Description”The Get-LMRecentlyDeleted function queries the LogicMonitor recycle bin for deleted resources within a configurable time range. Results can be filtered by resource type and deleted-by user, and support paging through the API using size, offset, and sort parameters.
Examples
Section titled “Examples”EXAMPLE 1
Section titled “EXAMPLE 1”Get-LMRecentlyDeleted -ResourceType device -DeletedBy "lmsupport"
Retrieves every device deleted by the user lmsupport over the past seven days.EXAMPLE 2
Section titled “EXAMPLE 2”Get-LMRecentlyDeleted -DeletedAfter (Get-Date).AddDays(-1) -DeletedBefore (Get-Date) -BatchSize 100 -Sort "+deletedOn"
Retrieves deleted resources from the past 24 hours in ascending order of deletion time.Parameters
Section titled “Parameters”-BatchSize
Section titled “-BatchSize”The number of records to request per API call (1-1000). Defaults to 1000.
Type: System.Int32DefaultValue: 1000SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 4 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DeletedAfter
Section titled “-DeletedAfter”The earliest deletion timestamp (inclusive) to return. Defaults to seven days prior when not specified.
Type: System.Nullable`1[System.DateTime]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 1 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DeletedBefore
Section titled “-DeletedBefore”The latest deletion timestamp (exclusive) to return. Defaults to the current time when not specified.
Type: System.Nullable`1[System.DateTime]DefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 2 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-DeletedBy
Section titled “-DeletedBy”Limits results to items deleted by the specified user principal.
Type: System.StringDefaultValue: ''SupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 3 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''-ResourceType
Section titled “-ResourceType”Limits results to a specific resource type. Accepted values are All, device, and deviceGroup. Defaults to All.
Type: System.StringDefaultValue: AllSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 0 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''Sort expression passed to the API. Defaults to -deletedOn.
Type: System.StringDefaultValue: -deletedOnSupportsWildcards: falseAliases: []ParameterSets:- Name: (All) Position: 5 IsRequired: false ValueFromPipeline: false ValueFromPipelineByPropertyName: false ValueFromRemainingArguments: falseDontShow: falseAcceptedValues: []HelpMessage: ''CommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.