Solved

dsquery: find inactive users of a particular group

Posted on 2006-06-08
2
1,808 Views
Last Modified: 2007-12-19

I'm trying to get a list of all users who havn't loggedin for more than 4 weeks and are members of the VPN group:

my first attempt:
dsquery user domainroot -limit 0 -inactive 4 | dsget user -memberof | find /i "CN=VPN"

the issue being that the filters take out so much, the resulting info is useless (listing group containers witih no user affiliation) e.g.
   "CN=VPNc,OU=company Worldwide,DC=corp,DC=company,DC=com"
   "CN=VPNc,OU=company Worldwide,DC=corp,DC=company,DC=com"
   "CN=VPNc,OU=company Worldwide,DC=corp,DC=company,DC=com"
   "CN=VPNc,OU=company Worldwide,DC=corp,DC=company,DC=com"
   "CN=VPNc,OU=company Worldwide,DC=corp,DC=company,DC=com"
   "CN=VPNc,OU=company Worldwide,DC=corp,DC=company,DC=com"
   "CN=VPNc,OU=company Worldwide,DC=corp,DC=company,DC=com"

How can I construct a usefull query?
0
Comment
Question by:Marketing_Insists
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 51

Accepted Solution

by:
Netman66 earned 500 total points
ID: 16866657
Try:

dsget group "CN=VPNc,OU=company Worldwide,DC=corp,DC=company,DC=com" -members | dsquery user -inactive 4


0
 

Author Comment

by:Marketing_Insists
ID: 16915455
Thhanks!
0

Featured Post

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
Learn about cloud computing and its benefits for small business owners.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question