|
| 1 | +--- |
| 2 | +external help file: Logic.Monitor-help.xml |
| 3 | +Module Name: Logic.Monitor |
| 4 | +online version: |
| 5 | +schema: 2.0.0 |
| 6 | +--- |
| 7 | + |
| 8 | +# Get-LMRecentlyDeleted |
| 9 | + |
| 10 | +## SYNOPSIS |
| 11 | +Retrieves recently deleted resources from the LogicMonitor recycle bin. |
| 12 | + |
| 13 | +## SYNTAX |
| 14 | + |
| 15 | +``` |
| 16 | +Get-LMRecentlyDeleted [[-ResourceType] <String>] [[-DeletedAfter] <DateTime>] [[-DeletedBefore] <DateTime>] |
| 17 | + [[-DeletedBy] <String>] [[-BatchSize] <Int32>] [[-Sort] <String>] [-ProgressAction <ActionPreference>] |
| 18 | + [<CommonParameters>] |
| 19 | +``` |
| 20 | + |
| 21 | +## DESCRIPTION |
| 22 | +The Get-LMRecentlyDeleted function queries the LogicMonitor recycle bin for deleted resources |
| 23 | +within a configurable time range. |
| 24 | +Results can be filtered by resource type and deleted-by user, |
| 25 | +and support paging through the API using size, offset, and sort parameters. |
| 26 | + |
| 27 | +## EXAMPLES |
| 28 | + |
| 29 | +### EXAMPLE 1 |
| 30 | +``` |
| 31 | +Get-LMRecentlyDeleted -ResourceType device -DeletedBy "lmsupport" |
| 32 | +``` |
| 33 | + |
| 34 | +Retrieves every device deleted by the user lmsupport over the past seven days. |
| 35 | + |
| 36 | +### EXAMPLE 2 |
| 37 | +``` |
| 38 | +Get-LMRecentlyDeleted -DeletedAfter (Get-Date).AddDays(-1) -DeletedBefore (Get-Date) -BatchSize 100 -Sort "+deletedOn" |
| 39 | +``` |
| 40 | + |
| 41 | +Retrieves deleted resources from the past 24 hours in ascending order of deletion time. |
| 42 | + |
| 43 | +## PARAMETERS |
| 44 | + |
| 45 | +### -ResourceType |
| 46 | +Limits results to a specific resource type. |
| 47 | +Accepted values are All, device, and deviceGroup. |
| 48 | +Defaults to All. |
| 49 | + |
| 50 | +```yaml |
| 51 | +Type: String |
| 52 | +Parameter Sets: (All) |
| 53 | +Aliases: |
| 54 | + |
| 55 | +Required: False |
| 56 | +Position: 1 |
| 57 | +Default value: All |
| 58 | +Accept pipeline input: False |
| 59 | +Accept wildcard characters: False |
| 60 | +``` |
| 61 | +
|
| 62 | +### -DeletedAfter |
| 63 | +The earliest deletion timestamp (inclusive) to return. |
| 64 | +Defaults to seven days prior when not specified. |
| 65 | +
|
| 66 | +```yaml |
| 67 | +Type: DateTime |
| 68 | +Parameter Sets: (All) |
| 69 | +Aliases: |
| 70 | + |
| 71 | +Required: False |
| 72 | +Position: 2 |
| 73 | +Default value: None |
| 74 | +Accept pipeline input: False |
| 75 | +Accept wildcard characters: False |
| 76 | +``` |
| 77 | +
|
| 78 | +### -DeletedBefore |
| 79 | +The latest deletion timestamp (exclusive) to return. |
| 80 | +Defaults to the current time when not specified. |
| 81 | +
|
| 82 | +```yaml |
| 83 | +Type: DateTime |
| 84 | +Parameter Sets: (All) |
| 85 | +Aliases: |
| 86 | + |
| 87 | +Required: False |
| 88 | +Position: 3 |
| 89 | +Default value: None |
| 90 | +Accept pipeline input: False |
| 91 | +Accept wildcard characters: False |
| 92 | +``` |
| 93 | +
|
| 94 | +### -DeletedBy |
| 95 | +Limits results to items deleted by the specified user principal. |
| 96 | +
|
| 97 | +```yaml |
| 98 | +Type: String |
| 99 | +Parameter Sets: (All) |
| 100 | +Aliases: |
| 101 | + |
| 102 | +Required: False |
| 103 | +Position: 4 |
| 104 | +Default value: None |
| 105 | +Accept pipeline input: False |
| 106 | +Accept wildcard characters: False |
| 107 | +``` |
| 108 | +
|
| 109 | +### -BatchSize |
| 110 | +The number of records to request per API call (1-1000). |
| 111 | +Defaults to 1000. |
| 112 | +
|
| 113 | +```yaml |
| 114 | +Type: Int32 |
| 115 | +Parameter Sets: (All) |
| 116 | +Aliases: |
| 117 | + |
| 118 | +Required: False |
| 119 | +Position: 5 |
| 120 | +Default value: 1000 |
| 121 | +Accept pipeline input: False |
| 122 | +Accept wildcard characters: False |
| 123 | +``` |
| 124 | +
|
| 125 | +### -Sort |
| 126 | +Sort expression passed to the API. |
| 127 | +Defaults to -deletedOn. |
| 128 | +
|
| 129 | +```yaml |
| 130 | +Type: String |
| 131 | +Parameter Sets: (All) |
| 132 | +Aliases: |
| 133 | + |
| 134 | +Required: False |
| 135 | +Position: 6 |
| 136 | +Default value: -deletedOn |
| 137 | +Accept pipeline input: False |
| 138 | +Accept wildcard characters: False |
| 139 | +``` |
| 140 | +
|
| 141 | +### -ProgressAction |
| 142 | +{{ Fill ProgressAction Description }} |
| 143 | +
|
| 144 | +```yaml |
| 145 | +Type: ActionPreference |
| 146 | +Parameter Sets: (All) |
| 147 | +Aliases: proga |
| 148 | + |
| 149 | +Required: False |
| 150 | +Position: Named |
| 151 | +Default value: None |
| 152 | +Accept pipeline input: False |
| 153 | +Accept wildcard characters: False |
| 154 | +``` |
| 155 | +
|
| 156 | +### CommonParameters |
| 157 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). |
| 158 | +
|
| 159 | +## INPUTS |
| 160 | +
|
| 161 | +## OUTPUTS |
| 162 | +
|
| 163 | +## NOTES |
| 164 | +You must establish a session with Connect-LMAccount prior to calling this function. |
| 165 | +
|
| 166 | +## RELATED LINKS |
0 commit comments