dsquery

Yorkie

Distinguished
Jul 27, 2004
16
0
18,510
Archived from groups: microsoft.public.win2000.active_directory (More info?)

Hi,

I have run the query below to create a list of all users for our Domain.
Which worked fine.

C:\>dsquery user -name * -limit 0 > c:\dsquery

I now want to run a query to see which accounts have been inactive for the
last 2 months so I tried the following.

C:\>dsquery user -name * -limit 0 -inactive 4 > c:\dsquery

But get the following error:-

dsquery failed:The parameter is incorrect.:Windows could not run this query
because you are connected to a domain that does not support this query.
type dsquery /? for help


Am I doing something wrong? Because it is saying the “domain does not
support this query� but I am running this in the same domain (our only
domain) as the first query.

NOTE:- I am running the query from a windows2003 server where all the domain
controllers are windows 2000.
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.active_directory (More info?)

That requires the existence of an attribute that doesn't exist in a 2K domain.

You might want to look at oldcmp which can be used for users as well.

http://www.joeware.net/win/free/tools/oldcmp.htm

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net


yorkie wrote:
> Hi,
>
> I have run the query below to create a list of all users for our Domain.
> Which worked fine.
>
> C:\>dsquery user -name * -limit 0 > c:\dsquery
>
> I now want to run a query to see which accounts have been inactive for the
> last 2 months so I tried the following.
>
> C:\>dsquery user -name * -limit 0 -inactive 4 > c:\dsquery
>
> But get the following error:-
>
> dsquery failed:The parameter is incorrect.:Windows could not run this query
> because you are connected to a domain that does not support this query.
> type dsquery /? for help
>
>
> Am I doing something wrong? Because it is saying the "domain does not
> support this query� but I am running this in the same domain (our only
> domain) as the first query.
>
> NOTE:- I am running the query from a windows2003 server where all the domain
> controllers are windows 2000.
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.active_directory (More info?)

dsquery user -name * -inactive 4 -limit 0

See tip 7358 » How can I report all inactive user accounts, and optionally disable them?
in the 'Tips & Tricks' at http://www.jsifaq.com

On Thu, 2 Jun 2005 06:59:35 -0700, yorkie <yorkie@discussions.microsoft.com> wrote:

>Hi,
>
>I have run the query below to create a list of all users for our Domain.
>Which worked fine.
>
>C:\>dsquery user -name * -limit 0 > c:\dsquery
>
>I now want to run a query to see which accounts have been inactive for the
>last 2 months so I tried the following.
>
>C:\>dsquery user -name * -limit 0 -inactive 4 > c:\dsquery
>
>But get the following error:-
>
>dsquery failed:The parameter is incorrect.:Windows could not run this query
>because you are connected to a domain that does not support this query.
>type dsquery /? for help
>
>
> Am I doing something wrong? Because it is saying the “domain does not
>support this query” but I am running this in the same domain (our only
>domain) as the first query.
>
>NOTE:- I am running the query from a windows2003 server where all the domain
>controllers are windows 2000.