TestimoX

API Reference

Command

Clear-ADXRecycleBin

Namespace ADPlayground.PowerShell

Removes deleted Active Directory objects older than a specified number of days.

Examples

Authored help example

Example 1: Preview permanent deletion of tombstoned objects older than 90 days


Clear-ADXRecycleBin -OlderThanDays 90 -Domain 'contoso.com' -WhatIf
        

Example 2: Clean the recycle bin in the current domain after a review window


Clear-ADXRecycleBin -OlderThanDays 180
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Clear-ADXRecycleBin [-OlderThanDays <int>] [-Domain <string>] [<CommonParameters>]
#

Parameters

OlderThanDays int optionalposition: 0pipeline: false
Number of days to keep. Items older than this are removed.
Domain string optionalposition: namedpipeline: false
Optional domain name. Uses current domain if omitted.