locked
AD disabled users from DG & Security group RRS feed

  • Question

  • I am looking for a script to identify all AD disabled users still present in AD distribution group & Security group from entire domain.

    Please help me.

    • Moved by Bill_Stewart Friday, October 24, 2014 2:08 AM This is not "scripts on demand"
    Monday, July 21, 2014 4:26 PM

All replies

  • What have you tried?

    Search-ADAccount -User -AccountDisabled

    This will search the whole domain for disabled user accounts.


    ¯\_(ツ)_/¯

    Monday, July 21, 2014 5:03 PM
  • Hi jrv,
    I am planning to remove Disabled users from distribution groups & security groups. Also i want to log those DG & SG.
    Tuesday, July 22, 2014 11:02 AM
  • Search in Script Center if not available Post in Request

    Regards Chen V [MCTS SharePoint 2010]

    Tuesday, July 22, 2014 12:34 PM
  • Hi jrv,
    I am planning to remove Disabled users from distribution groups & security groups. Also i want to log those DG & SG.

    Just enumerate the disabled user's membership and remove them.  Write output to you logs.

    This is a good learning exercise for you first script.  It is very simple and straight forward.  I gave you the most important piece above,

    Good Luck.


    ¯\_(ツ)_/¯

    Tuesday, July 22, 2014 12:38 PM