Sponsor

2006/05/05

Is It Your Turn to Take a Bow?

1. Perspectives - Is It Your Turn to Take a Bow?

2. This & That - Monad Gets a Real Name

3. Script Watch - Protect Your IGDs Against Hacker and Spyware Attacks

4. Scripter's Toolkit - Short Shell Script Supplies Diruse.exe Arguments

5. Featured White Paper - Do You Need 100% Uptime For Your Mission-Critical Email?

6. Announcements - Windows IT Pro Master CD--SAVE 50%! - May Exclusive--Save $100 off the Exchange & Outlook Newsletter

7. Events and Resources - The Essential Guide to Infrastructure Consolidation - Configuring and Managing a Virtual Lab for the Enterprise - Email Compliance Requirements: Getting Started - Expect the Unexpected: Disaster Recovery - Maximize the Potential of Your Windows Environment

/* ==================================== */

:: **** 1. Perspectives **** by Karen Bemowski, kbemowski@windowsitpro.com

Is It Your Turn to Take a Bow? Anne Grubb and I are on a mission. Scripting is taking center stage in the August issue of Windows IT Pro. We need to find a super scripter--an IT Pro Hero in the scripting world--that we can put in the spotlight. You don't need to have superhero powers like Superman or the Bionic Women to be an IT Pro Hero. And you don't need to have a corner office with a bird's eye view. We're looking for a regular Joe or Joanna whose scripting skills saved the day by solving a serious problem, saving a lot of money, or automating a very time-consuming task. If you fit this bill, don't be shy and tell us your story. Tell us about the situation you faced, how your script remedied that situation, and the results of using that script. For good examples of the type of story we're looking for, check out "Crouching Server, Hidden Memory Leak" ( http://penton.whatcounts.com/t?ctl=2939F:610453 ) and "Scripts Save Small Company Some Considerable Cash" ( http://penton.whatcounts.com/t?ctl=2939C:610453 ). You don't need to be a Windows IT Pro subscriber to view these articles. As the examples show, your story doesn't need to be that long--only about 800 to 1000 words. When you send us your story, please include the code file. Although we won't publish the script in the magazine, we'll include a link to it so that readers can download it. That way, if readers find themselves in a similar situation, they can check out your script and possibly adapt it for use in their environment. Please send your stories to me at scriptingcentral@windowsitpro.com or Anne Grubb, Windows IT Pro senior editor, at agrubb@windowsitpro.com. We need to have your story by June 1. If your story is chosen, you'll not only get to be in the spotlight but also get $200 and a copy of the issue in which your story appears. Speaking of being in the spotlight, I'd like to thank Joshua Arzt, David Gray, James Troy, Tad Sherrill, and Bill McEvoy for responding to last month's column and sending me their scripts and code snippets. You're scripting heroes in my book!

:: **** 2. This & That ****

Monad Gets a Real Name Unless you have been working way too hard or have taken a hiatus from scripting the past couple of years, you've probably heard of Monad. Monad has been the code name for a command-line shell and task-based scripting technology. Earlier this week, Microsoft finally announced an official name for this technology: Windows PowerShell. For more information about Windows PowerShell and links to related Web pages, go to http://penton.whatcounts.com/t?ctl=29397:610453 .

:: **** 3. Script Watch ****

Protect Your IGDs Against Hacker and Spyware Attacks Many broadband routers, cable modems, and other Internet Gateway Devices (IGDs) are Universal Plug and Play (UPnP) enabled so that you can remotely manage them. However, UPnP can pose a security risk. Dave Roth tells you about this risk and how you can mitigate it with a Perl script in the article "Query IGD Port Maps." Look for this article in the June issue of Windows Scripting Solutions.

:: **** 4. Scripter's Toolkit ****

' Editor's note: Bill Stewart is the third and final winner of the "Mighty ' Mini" contest. His script supplies default command-line arguments for ' the Diruse.exe utility. Bill also won the drawing for the extra $100.

Short Shell Script Supplies Diruse.exe Arguments Diruse.exe is a handy command-line tool when you want to quickly see how much disk space a directory is using. To use it, you type the Diruse command, its options, and one or more directory names. I found myself frequently typing the command

Diruse /, .

The /, option tells Diruse to use thousands separators when displaying directory sizes. The period (.) tells Diruse to get the current directory's size. Because I was typing this command fairly frequently, I created a command- shell script that initializes the Diruse command with the /, option and the current directory as defaults. The script also expands the period to the full name of the current directory. That way, the full directory name appears in the Diruse output. This script even uses a shorter command name--"du" instead of "diruse"--to boot. Here's my DU.cmd script:

@Echo Off If Not {%1}=={/?} Goto :START Echo Runs Diruse with default command-line options. Echo. Echo DU [options] [path [...]] Echo. Echo Uses the Diruse utility to display the size of one or more Echo directories. Echo. Echo [options] are for the Diruse command; use the command "Diruse /?" Echo for help with its options. Echo. Echo The current directory is assumed if none is specified. Goto :EOF

:START Setlocal Enableextensions Set ARGS=/, Set DIRS= If {%1} NEQ {} Goto :ARGS

:CURRDIR Set DIRS="%CD%" Goto :EXEC

:ARGS Set ARG=%~1 If "%ARG:~0,1%"=="/" (Set ARGS=%ARGS% "%ARG%" & Shift) Else (Goto :DIRS) If {%1}=={} Goto :CURRDIR Goto :ARGS

:DIRS If {%1}=={} Goto :EXEC If Exist "%~1\" (Set DIRS=%DIRS% "%~f1") Else (Echo %~1 not found) Shift Goto :DIRS

:EXEC If Defined DIRS Diruse %ARGS% %DIRS% Endlocal

To change the default options for the Diruse command, modify the Set ARGS= line under the :START label in the script. For example, if you want to use both the /* and /, options, use this line:

Set ARGS=/* /,

The script's logic and flow should be fairly easy to follow. You can download a commented version of DU.cmd by going to http://penton.whatcounts.com/t?ctl=2939D:610453 and clicking the 50174.zip hotlink.) The script uses Diruse.exe from the Windows XP Service Pack 2 Support Tools (http://penton.whatcounts.com/t?ctl=2939B:610453 9761-BA8011FABF38). When you launch DU.cmd, you don't need to specify a directory name or even a period if you want the size of the current directory. Alternatively, you can specify multiple directory names on the command line. If any of the directory names contain spaces, enclose them in quotes. (DU.cmd handles quotes automatically.) I've found this script to be a very useful addition to my scripting toolkit. --Bill Stewart

:: **** 5. Featured White Paper ****

Do You Need 100% Uptime For Your Mission-Critical Email? Learn how to address challenges such as making email truly available 24x7x365, securing against viruses, comprehensively backing up email data, and more. http://penton.whatcounts.com/t?ctl=29396:610453

:: **** 6. Announcements ****

Windows IT Pro Master CD--SAVE 50%! Subscribe today and get portable, high-speed access to the entire Windows IT Pro article database on CD: a searchable library that includes every Windows IT Pro issue ever published. The newest issue also includes BONUS Windows IT Tips. Order now and save: http://penton.whatcounts.com/t?ctl=293A2:610453

May Exclusive--Save $100 off the Exchange & Outlook Newsletter For a limited time, order the Exchange & Outlook Administrator newsletter and SAVE up to $100! You'll get 12 helpful issues loaded with solutions you won't find anywhere else and FREE access to the entire Exchange & Outlook online article database. Subscribe now: http://penton.whatcounts.com/t?ctl=293A1:610453

:: **** 7. Events and Resources ****

The Essential Guide to Infrastructure Consolidation Learn the essentials about how consolidation and selected technology updates build an infrastructure that can handle change effectively. http://penton.whatcounts.com/t?ctl=29399:610453

Configuring and Managing a Virtual Lab for the Enterprise Use virtual server technology to consolidate your production environment using only a fraction of the server hardware in the data center. Live Event: Thursday, May 18 http://penton.whatcounts.com/t?ctl=29398:610453

Email Compliance Requirements: Getting Started Design effective policies to protect your company's assets and data. Don't accidentally damage what you mean to protect! View this on-demand seminar today. http://penton.whatcounts.com/t?ctl=2939A:610453

Expect the Unexpected: Disaster Recovery Learn to differentiate alternative solutions to disaster recovery for your Windows-based applications to determine what works for you and ensure seamless recovery of your key systems--whether a disaster strikes just one server or the whole site. Live event: Thursday, May 11 http://penton.whatcounts.com/t?ctl=293A0:610453

Maximize the Potential of Your Windows Environment Increase administration efficiency, build flexible yet inexpensive file-server environments, and maximize potential through consolidation of your SQL Server environment. Make the most of your resources today! http://penton.whatcounts.com/t?ctl=2939E:610453

==== Contact Us ====

About Scripting Central -- scriptingcentral@windowsitpro.com About product news -- scriptingcentral@windowsitpro.com About your subscription -- scripting_central@list.windowsitpro.com

=================================

This email newsletter is brought to you by Windows IT Pro, the leading publication for IT professionals deploying Windows and related technologies. Subscribe today! http://penton.whatcounts.com/t?ctl=293A3:610453

To ensure that future email messages you receive from Scripting Central aren't mistakenly blocked by antispam software, be sure to add scripting_central@list.windowsitpro.com to your list of allowed senders and contacts.

Manage Your Account You are subscribed as news-and-stuff@arconati.us

You are receiving this email message because you subscribed to this newsletter on our Web site. To unsubscribe, click the unsubscribe link: http://penton.whatcounts.com/u?id=28351AE7DCFB1F6C2D5B43837AFBECDE

View the Windows IT Pro Privacy Policy. http://penton.whatcounts.com/t?ctl=293A4:610453

Windows IT Pro is a division of Penton Media, Inc. 221 East 29th Street, Loveland, CO 80538, Attention: Customer Service Department

Copyright 2006, Penton Media, Inc. All Rights Reserved.

No comments:

Post a Comment

Keep a civil tongue.

Label Cloud

Technology (1464) News (793) Military (646) Microsoft (542) Business (487) Software (394) Developer (382) Music (360) Books (357) Audio (316) Government (308) Security (300) Love (262) Apple (242) Storage (236) Dungeons and Dragons (228) Funny (209) Google (194) Cooking (187) Yahoo (186) Mobile (179) Adobe (177) Wishlist (159) AMD (155) Education (151) Drugs (145) Astrology (139) Local (137) Art (134) Investing (127) Shopping (124) Hardware (120) Movies (119) Sports (109) Neatorama (94) Blogger (93) Christian (67) Mozilla (61) Dictionary (59) Science (59) Entertainment (50) Jewelry (50) Pharmacy (50) Weather (48) Video Games (44) Television (36) VoIP (25) meta (23) Holidays (14)

Popular Posts