Solved

dsquery: find inactive users of a particular group

Posted on 2006-06-08
2
1,761 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
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This may not be a text book method to resolve VSS backup issues but it seemed to have worked on few of the Windows 2003 servers we had issues while performing a Volume Shadow Copy backup. If you have issues while performing a shadow copy backup usin…
Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now