If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hello Guest,Our records indicate that you have never posted to our site before! Why not make your first post today by saying hello to our community in our Introductions forum.

Please review the forums rules, start with your first post today and become an active part of petri.co.il forums now!

Comment

If you have like you say no idea about vbscripts, it would be easyer and probably saver to use a command line tool:

For pruning/moving/disabling Old Accounts in AD you can use the powerfull tool OldCmp.exe (free for download). OldCmp can also be used to clean up user accounts when the proper filter is specified.
(http://www.joeware.net/freetools/tools/oldcmp/index.htm browse to "See current usage screens" for examples)

Comment

Hi Rems youve hit the spot with the command line i would be much happier using that. I had a play with your second command line tool but generate the following error.

Microsoft Windows [Version 5.2.3790](C) Copyright 1985-2003 Microsoft Corp.C:\Documents and Settings\martin.greenhill>dsquery user -inactive 10 -limit 0 |dsmod user -disabled nodsquery 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.dsmod failed:`Target object for this command' is missing.type dsmod /? for help.C:\Documents and Settings\martin.greenhill>

If you have like you say no idea about vbscripts, it would be easyer and probably saver to use a command line tool:

For pruning/moving/disabling Old Accounts in AD you can use the powerfull tool OldCmp.exe (free for download). OldCmp can also be used to clean up user accounts when the proper filter is specified.
browse to "See current usage screens" for examples)

Comment

Is possible to raise the DOMAIN Functional Level?
If your domain is at Windows Server 2003 functional level or more recent, there is a new attribute called lastLogonTimeStamp.

The -inactive switch of dsquery is querying the lastLogonTimeStamp attribute of the object.

lastLogonTimeStamp represents the time when the user last logged onto the domain, like the lastLogon attribute does. Unlike lastLogon, this new attribute is replicated.

If your domain is not at Windows Server 2003 functional level, you cannot run a single command line command to find inactive users you must use a script (vbs example: http://www.rlmueller.net/Last%20Logon.htm). Every Domain Controller in the domain must be queried to find the latest lastLogon date for each user, because the lastLogon attribute is not replicated. The lastest date found is kept by the script in a dictionary object.

\Rems

This posting is provided "AS IS" with no warranties, and confers no rights.__________________