Link to home
Create AccountLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

Retrieve Boot time for a list of computers

I need a tool that will retrieve a boot time for a list of computers.
for one computer I can run Systeminfo command and will retrieve the boot time among other info.
Bu I need to retrieve only boot time for a list of computers at one time.
Thanks
Avatar of x3man
x3man

I would use psexec to run the systeminfo command on a list of machines and pipe the output into a file. See link for how to do this: http://technet.microsoft.com/en-us/sysinternals/bb897553
Avatar of Krzysztof Pytko
Check this VBScript at
http://www.wisesoft.co.uk/scripts/vbscript_display_system_up_time-last_boot_up_time.aspx

you may modify it a little bit to read computers from text file

Regards,
Krzysztof
Avatar of jskfan

ASKER

systeminfo doesn't need PSEXEC
ASKER CERTIFIED SOLUTION
Avatar of x3man
x3man

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
@jskfan: I have used psexec because I wanted it to run only on a predifined list of computers. I'm not aware of a way that you can point systeminfo at a predefined list?
Avatar of jskfan

ASKER

I used:
systeminfo /s "<computername>" /u "<myAdminaccount>"   >> c:\boot.txt

i replace computername for each computer on the list. it worked, but it still dumps all the info, while I need just the  system boot time.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
If you use PSEXEC you won't need to manually run systeminfo command for every computer in the list. You can just point PSEXEC at the text list of computer names. As long as you use the command I have posted above it will produce a list of all the computers in the following format:

computer1
Up Time ....
computer2
Up Time ....
computer3
Up Time ....
etc
etc
Avatar of jskfan

ASKER

This is excellent !!!

systeminfo /s "<computername>" /u "<myAdminaccount>" | find "Time:"  >> c:\boot.txt

Avatar of jskfan

ASKER

Thank you Guys!
You're welcome :)

Krzysztof