Link to home
Start Free TrialLog in
Avatar of Marketing_Insists
Marketing_Insists

asked on

dsquery: find inactive users of a particular group


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?
ASKER CERTIFIED SOLUTION
Avatar of Netman66
Netman66
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Marketing_Insists
Marketing_Insists

ASKER

Thhanks!