TestimoX

API Reference

Class

RecycleBinManager

Namespace ADPlayground
Assembly ADPlayground

Provides helpers for working with the Active Directory Recycle Bin.

Inheritance

  • Object
  • RecycleBinManager

Constructors

public RecycleBinManager(Func<String, IEnumerable<DeletedAdObject>> fetchObjects = null, Action<DeletedAdObject> deleteObject = null) #

Initializes a new instance of the RecycleBinManager class.

Parameters

fetchObjects System.Func{System.String,System.Collections.Generic.IEnumerable{ADPlayground.DeletedAdObject}} = null optionalposition: 0
Delegate used to retrieve deleted objects.
deleteObject System.Action{ADPlayground.DeletedAdObject} = null optionalposition: 1
Delegate used to delete an object.

Methods

public Int32 ClearRecycleBin(DateTime cutoff, String domain = null) #
Returns: Int32

Removes deleted objects older than the provided cutoff.

Parameters

cutoff System.DateTime requiredposition: 0
Delete objects changed before this time.
domain System.String = null optionalposition: 1
Optional domain name.

Returns

Number of removed objects.

public Void DeleteObject(DeletedAdObject obj) #
Returns: Void

Deletes a specific object from the recycle bin.

Parameters

obj ADPlayground.DeletedAdObject requiredposition: 0
Object to delete.
public IEnumerable<DeletedAdObject> GetDeletedObjects(String domain = null) #
Returns: IEnumerable<DeletedAdObject>

Retrieves deleted objects from the specified domain.

Parameters

domain System.String = null optionalposition: 0
Optional domain name. Current domain is used if omitted.

Returns

Collection of deleted objects.