Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

April 11, 2005 12:00 AM

Snippets to Go

Windows IT Pro
InstantDoc ID #45815
Rating: (0)

Do you ever get so busy that you forget to eat lunch or hold off going to the restroom until the last possible minute? Do you ever get so involved in your work that hours slip by in what seems like only minutes? If you're a systems or network administrator, engineer, or architect, you probably answered yes to these questions. In a world where companies are trying to do more with less to stay competitive, long to-do lists are the norm rather than the exception for IT staff.

Automating tasks with scripts is a proven way to save IT staff a lot of time, especially when the tasks are tedious and must be performed regularly. However, writing the script can be time-consuming. To help reduce the up-front investment of time, Windows Scripting Solutions is starting the new Snippets to Go column. This column will present functions, subroutines, and other blocks of code that you can drop into your scripts every time you need to perform a certain operation or procedure. The code in these reusable snippets requires little or no modification, so you'll save time because you don't have to reinvent the wheel each time you write a script.

If you have snippets you'd like to share, we encourage you to tell us about them. The snippets can be in any scripting language. They should perform a specific operation or procedure and be easily dropped into or called from scripts. Email your snippet and a description (500 words or less) of what it does and how to use it in a script to snippets@windowsitpro.com. If we print your submission, you'll get $100.

This month, we offer the IIf and GetToken functions. The IIf function evaluates an expression and returns a specific value, depending on whether the expression evaluates to True or False. The GetToken function parses a line of text for a specific token, using the specified delimiter. To read about these functions, click the appropriate Side Bar link above.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.