In any environment if the employee leaves the company you have to disable the user account in active directory, all the disabled users are still there in the Distribution list and security groups and have to remove the disabled user account manually
If you want to know all the disabled users from the active directory group use the below command
This command will list the members from the active directory group with the status
Find the command to get the members status from the group (Account disabled or not)
Group name: sales_executes
Syntax:
dsquery group -samid “<Group Name>” | dsget group -members
Example:
dsquery group -samid <Group name> | dsget group -members |
If you want to know all the disabled users from the active directory group use the below command
This command will list the members from the active directory group with the status
Find the command to get the members status from the group (Account disabled or not)
Group name: sales_executes
Syntax:
dsquery group -samid “<Group Name>” | dsget group -members
Example:
dsquery group -samid <Group name> | dsget group -members |
No comments:
Post a Comment