Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


September 11, 2006

Valuable Lessons Learned


RSS
View this exclusive article with VIP access -- click here to join |
See More Tips Articles Here | Reprints | Or sign up for our VIP Monthly Pass!
Main Article    Reduce Your Downtime While Reading Uptime Reports

On the journey to create a successful script, there are sometimes unexpected detours in the road. Sometimes a script just comes together and works on the first try. Other times, there are challenges at every turn. I have to admit that UptimeReport.bat didn’t work correctly on the first or even the second try. I ran into problems finding utilities that provided the information I needed, sorting the utilities’ output, dealing with errors, and getting output displayed in a meaningful format. My struggles revealed some real-world problems that scripters can face. By sharing the lessons I learned, I hope you can avoid similar problems.

Make sure a tool’s output is consistent across OSs. The first time I got UptimeReport.bat working, a savvy systems administrator looked at the report and questioned some of the uptime numbers. After some investigation, I realized that my script was mysteriously introducing some bogus numbers into the report. It took only a few minutes of testing to determine that the Uptime.exe utility in the Microsoft Windows 2000 Server Resource Kit reports uptime results differently on Windows Server 2003 and Windows 2000 systems. When you use the For command to extract data from Uptime.exe’s output, these differences cause problems. For this reason, I used Sysinternals’ PsInfo tool. It has a consistent output format that works well with the For command. . . .

Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Next Version of Exchange Named Exchange 2010?

Microsoft apparently inadvertently announced the official name of the next version of Exchange Server. ...


Related Events Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing