Documentation
Install CleanupMonster
Install CleanupMonster from PowerShell Gallery.
Install CleanupMonster from PowerShell Gallery:
Install-Module -Name CleanupMonster -Scope CurrentUser
Import the module before running cleanup discovery:
Import-Module CleanupMonster
Use an account that can read the Active Directory attributes your cleanup policy relies on. In hardened environments, even reporting-only runs may require delegated permissions.