troubleshooting Question

Script to query time (net time) on all servers via accessing the AD schema

Avatar of mikemost
mikemostFlag for United States of America asked on
Windows BatchPerl
8 Comments1 Solution550 ViewsLast Modified:
Greetings All,

I've searched around EE & Google but am yet to find a good sample script to get me started. What I'm looking for is either a Winbatch sample script, or windows command file that can query the active directory schema, or a collection of OU's, and go out to the servers within the OU's and retrieve the current time (run a net time command) and output the results into a file, preferably a .csv but an .xls or even .txt file would suffice just fine. I believe this should be possible through WMI, if that proves to be to big of a hurdle, I could attempt to use a script which could simply rely on pre-determined list. The benefit of going into AD would be avoiding calculating every single server in our environment as my company is a small enterprise with god knows how many virtual servers! It would also be great if such a script could specify in the output servers that do not respond into a separate category in the output file due to certian VM's being powered off at certain times. Any and all assistance is appreciated and this is certainly a 500 point question.

Best Regards,
Mike Mostwill
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros