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
(2)
720 times
Add to favorites
System Center
9/12/2018
E-mail Twitter del.icio.us 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.  
      
      Thanks!