Kenneth Vandbaek
asked on
How to find computers in AD that has not login?
Some time our user don't shutdown the copmuter they work with.
How is it possible for me to find these computers that hasen't been rebooted?
Best regards
How is it possible for me to find these computers that hasen't been rebooted?
Best regards
oh. just one point to note.. shutdown.exe doesn't work on its own. you'll need to add -s ("shutdown.exe -s") which will do the shutdown.
Microsoft provides a tool, UPTIME, that you can use to determine exactly how long any one computer has been running for.
http://support.microsoft.com/kb/232243
If you want to query AD directly, you can use ADFIND
(http://joeware.net/freetools/tools/adfind/index.htm)
The syntax would be something like (you'll have to play with it a bit, especially the time format)
a -f "&(objectcategory=computer )(lastlogo ntimestamp >=03/24/20 11-10:30:2 6)" -dn
http://support.microsoft.com/kb/232243
If you want to query AD directly, you can use ADFIND
(http://joeware.net/freetools/tools/adfind/index.htm)
The syntax would be something like (you'll have to play with it a bit, especially the time format)
a -f "&(objectcategory=computer
thanks Chev, thats a useful little tool.
ASKER
We have in our company different logonserver. We have a longonserver for each site in every countries we do business in. The computer and user information on each server is different, well it takes time before everyone is up todate.
Is it possible with the last tool, to change the logonsever?
Is it possible with the last tool, to change the logonsever?
Hi,
if you are on windows server2008 i can write to ps code that can find uptime and then also shutdown the systems based on criteria supplied
if you are on windows server2008 i can write to ps code that can find uptime and then also shutdown the systems based on criteria supplied
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
But as a possible resolution for you, you CAN set computers to shutdown automatically at certain times using the windows Task scheduler and putting the new task as windows\system32\shutdown.
this might also be applied by GPO
Obviously I can appreciate that this might not work so well in an environment where you have 24/7 workers.