Find Disabled users in a AD group

AD Group housekeeping is great way to maintain the access and also to clean up license if you are provisioning users license via AD group, There is a quick and easy way.

Below script will help you

$users = get-adgroupmember -identity "Group name" | select samaccountname

Foreach($user in $users){
    Get-ADuser $user.samaccountname | select samaccountname,enabled
}

Published by iamfazul

Author of the site

Leave a comment