Solved

dsquery: find inactive users of a particular group

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

861 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