dh061
asked on
How to search ADUC for users that are not in a Group
The company I work for setup web groups to manage who can be on the internet at what time. The groups
Web_Tier 1 -Internet all the time
Web_Tier 2 Internet after lunch
Web_Tier 3 Internet after hours.
Here is where the problem is, if the member is not in one of these groups they get access to the internet all the time. I need a way to search Active Directory Users and Computers for users that are not I'm any of the groups. If that search is not possible, then if I can just search for users not in web_tier 3. that search would work because 80% of the users are in web_tier3.
Any help would be greatly appreciated
Web_Tier 1 -Internet all the time
Web_Tier 2 Internet after lunch
Web_Tier 3 Internet after hours.
Here is where the problem is, if the member is not in one of these groups they get access to the internet all the time. I need a way to search Active Directory Users and Computers for users that are not I'm any of the groups. If that search is not possible, then if I can just search for users not in web_tier 3. that search would work because 80% of the users are in web_tier3.
Any help would be greatly appreciated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Mike, thankyou very much for your help you saved me a lot of work. Is there anyway to make it put the inputs on a spread sheet?
Do you want to output those to a spreadsheet?
that you can do by
adfind -default -f "&(objectcategory=person)( objectclas s=user)(!m emberof=DN of web_tier 3)" samaccountname -csv > c:\notmember.csv
Thanks
Mike
that you can do by
adfind -default -f "&(objectcategory=person)(
Thanks
Mike
ASKER
Thanks again Mike, your simply the best!
http://www.microsoft.com/technet/scriptcenter/scripts/ad/groups/default.mspx?mfr=true
Other scripts that you may find useful can be found here:
http://www.microsoft.com/technet/scriptcenter/scripts/ad/groups/default.mspx?mfr=true
There are many ways to do what you are asking, but using these ready made scripts should fit the bill.