![]() ![]() ![]() (You can change the "primaryGroupID" as per your requirement)ĥ16:Domain Controllers Find all members for a particular group. Start DSQuery Open DSQUERY GUI Window rundll32 dsquery,OpenQueryWindow Querying Users & Groups Find out Account Expiry dateĭsquery user -name * -limit 0 | dsget user -samid -acctexpires Get all sAMAccount namesĭsquery user -o rdn -limit 0 Retrieve the DN of all users in the domain that are not direct members of a specified groupĭsquery * -filter "(&(objectCategory=person)(objectClass=user)(!(memberOf=Groupname,ou=West,ĭc=Contoso,dc=com))) -limit 0 > NotInGroup.txt Find all contacts in the organizational unit (OU)ĭsquery contact OU=Sales,DC=Contoso,DC=Com List of all users with primary group "Domain Users"ĭsquery * -filter "(primaryGroupID=513)" -limit 0 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |