Remove orphaned Active Directory Users from Configuration Manager

This PowerShell Script will compare all Users in System Center Configuration Manager with Active Directory and Outputs those Users which are no longer existing in Active Directory. Those can be deleted either manually or automatically by this Script.

5 Star
720 times
Add to favorites
System Center
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Import ActiveDirectory Module
    2 Posts | Last post September 12, 2018
    • Is this:
      # Import the ActiveDirectory module
      If (!(Get-Module ConfigurationManager)) {
          Import-Module ActiveDirectory
      Supposed to be this?
      # Import the ActiveDirectory module
      If (!(Get-Module ActiveDirectory)) {
          Import-Module ActiveDirectory
    • Thanks for the hint, you're absolutely right. I corrected the Script.
  • multiple domains
    1 Posts | Last post June 07, 2018
    • Great script.  We have multiple domains in our environment so we had to add a second try and catch in there to properly filter out the stale accounts.