Home > Networking Tips > Network Management > Getting over the hump -- Managing Windows networks using scripts, Part 5
Networking Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

NETWORK MANAGEMENT

Getting over the hump -- Managing Windows networks using scripts, Part 5


Mitch Tulloch
11.21.2007
Rating: -4.00- (out of 5)


Network management news, advice and technical information
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


When learning to script for managing Windows networks, you need to be aware of a bump in the road Mitch Tulloch calls "the hump." Learn how to get over the hump in this tip, originally published on WindowsNetworking.com.

In the previous article in this series we started exploring what we could do with the Win32_NetworkAdapterConfiguration class. This powerful WMI class has 61 properties and 41 methods that can be used for retrieving and changing TCP/IP networking settings on Windows computers.

To illustrate the power of this class, we took the sample script we developed in the first and second articles, and using information about this class on MSDN, we customized our original script to make it do something different. Specifically, we took a script that changed the IP address of a network adapter and customized it to come up with a new script that disables NetBIOS over TCP/IP (NetBT) on all network adapters that have TCP/IP bound and enabled on them.

We need to explore this powerful WMI class further, and we're going to do so in several future articles. But before we do this, let's talk about "the hump."

The hump
After I began this series of articles on how to manage Windows networks using scripts, I started to get emails from readers. Most of these emails involved readers asking a simple question: "How can I learn to script?" My initial reaction is usually to point the questioner to a variety of resources including articles on TechNet, different books, scripting newsgroups, and so on. Of course, when I think about it, that's like saying to someone who asks you how to become an expert in French cooking, "Here are some addresses of different cooking schools, titles of cookbooks, and websites. Go, start learning." That kind of answer may be helpful to those who have the initiative and self-discipline to learn a skill themselves, but it poses another question that's more interesting: Why do some of us have difficulty learning a s


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Network Management
Virtualization: The next generation of application delivery challenges
Improving the performance of Web traffic and application delivery
The link between network management and application delivery
How to align network usage information to business processes
How network management can use ITIL best practices to battle recession
How to monitor and manage your data center network
Building the network infrastructure in your data center
Power and cooling considerations for data center network design
Network performance and throughput in server virtualization environments
Return-all-values script: Managing Windows networks using scripts, Part 13

Working With Servers and Desktops
Understand Windows tracert output to troubleshoot network connectivity
Test your TCP/IP protocol stack to troubleshoot network connectivity
Checking IP configuration to troubleshoot Windows network connectivity
Physical network security key to fighting low-tech threats
Using ping command for troubleshooting Windows network connectivity
Bandwidth allocation: How can I give a download limit for each user?
How to use Netsh WLAN to configure Windows Server 2008 and Windows Vista wireless connections from the CLI
How to upgrade Windows Server 2003 to Server 2008
Top Windows Management Instrumentation (WMI) scripting books, websites
HTTP error code troubleshooting, Part 3: Disabling IE friendly error messages

Network Performance Management
Virtualization: The next generation of application delivery challenges
New skills emerge for network engineering and administration careers
Improving the performance of Web traffic and application delivery
Network performance management evolution: Involving other IT domains
Formula for proper bandwidth utilization on a T1 line
The link between network management and application delivery
IT automation, automated network management becoming essential
Network management and monitoring market remains crowded, fragmented
Network configuration flaws block server access and wireless printing
Xangati help desk 'DVR' feature speeds up trouble ticketing resolution

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
four-way server  (SearchNetworking.com)
mail user agent  (SearchNetworking.com)
netstat  (SearchNetworking.com)
Technical Office Protocol  (SearchNetworking.com)
Telnet  (SearchNetworking.com)
two-way server  (SearchNetworking.com)
virtual network adapter  (SearchNetworking.com)
virtual network computing  (SearchNetworking.com)
virtual systems management  (SearchNetworking.com)
VxWorks  (SearchNetworking.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


kill in the first place?

I tried to become a gourmet cook once, and here's how I went about it:

What was the result of all this? Soup all over the place, on the stovetop, on the walls, on the ceiling. And dirty pots and pans piled sky high. I didn't get lucky either -- it didn't taste all that great, either to my friends or to me. What went wrong? A lot of things. Specifically:

What kind of approach should I have followed instead of the one I used?

What does this have to do with learning to script? Well first of all, a little humor like this puts you in the mood to to listen, and now that I have your ear maybe you'll hear what I have to say. Almost every Windows administrator who wants to learn how to script usually hits a big bump in the road along the way, which I'll call "the hump." This hump appears when the brain starts to shut down because there are just too many concepts to absorb easily. This is because concepts don't exist in a vacuum, they are interrelated. For example, you can't really understand what a Property is unless you also grasp what a Method is. And both Properties and Methods are only understood in the context of Classes. And Classes must be Instantiated into Objects before they can have Properties and Methods, or more properly, Object References to the Instance of a Class have Properties and Methods you can read and manipulate. Sounds like gobbledygook, doesn't it? Well, that's because it is gobbledybook!

"Why can't I just learn to script? Why do I have to learn all these concepts and terminology?" Well, why do you have to learn the difference between a white sauce and brown sauce? Or know that sauces come in four basic types: purees, reductions, starch-bound and emulsions? Or that roux forms the basis for bechamel, veloute, etouffe and both white and brown sauce? And why do I need to understand the history of bechamel? Because in the long run you won't get anywhere unless you learn these basic concepts, as they (and many others) form the basis of most French cooking.

On the other hand, most of us in the real world (i.e. those of us who don't want to become professional chefs) don't have the time, money or patience to attend a French cooking school full time and spend the first six months making basic sauces again and again before we are taught how to fry a pork chop. I know I would get bored silly after only a few weeks and decide I better find a different career. It's the same with learning to script: As a busy network admin, I just can't spend three years learning every Property and Method associated with every WMI class that has anything to do with Windows networking. Or learn every aspect of the syntax of the VBScript language to become totally proficient in it. I had enough of that learning Fortran back in my freshman university days, writing program after program to print out the first ten squares, the first 100 primes, the first thousand Fibonacci numbers, and so on and so on. So given our limited time, money and patience, coupled with the intrinsic difficulty of learning the vast number of interrelated concepts involved in Windows scripting, how can ordinary administrators like us get over the hump and learn to script -- and do it usefully?

Getting over the hump
Clearly there's no magic answer to this question, but there are some things I've found helpful. Here's what's helped me:

Conclusion
I wrote this article because I sensed from some readers that they were already approaching the hump after only four articles. Hopefully what I've said here will help you overcome whatever is holding you back from really learning this stuff. In my next article, we'll return to exploring the Win32_NetworkAdapter Configuration class and see what we can do with it, and along the way we'll learn new concepts and reinforce ones previously introduced. We'll also learn additional bits and pieces of the VBScript syntax and see how we can make our scripts more elegant and useful. And then we'll explore some other WMI classes and eventually some advanced scripting topics like alternate credentials, remote scripting, COM objects, WSF scripts, and so on. We'll eventually tap into a few tools useful for writing scripts, but it's important to learn the basics first before you learn the shortcuts as it gives you a much deeper understanding of the subject and therefore more confidence in your skills. I'll also try to give you some exercises to complete on your own, and if you really want to learn to script, you need to do them and not just look at them and say "I can do that." After all, practice does make perfect. And finally, feel free as always to email me if you have any questions or suggestions concerning this series of articles. Good luck!

About the author:
Mitch Tulloch is a writer, trainer and consultant specializing in Windows server operating systems, IIS administration, network troubleshooting, and security. He is the author of 15 books including the Microsoft Encyclopedia of Networking (Microsoft Press), the Microsoft Encyclopedia of Security (Microsoft Press), Windows Server Hacks (O'Reilly), Windows Server 2003 in a Nutshell (O'Reilly), Windows 2000 Administration in a Nutshell (O'Reilly), and IIS 6 Administration (Osborne/McGraw-Hill). Mitch is based in Winnipeg, Canada, and you can find more information about his books at his website: www.mtit.com.

[TABLE]

WindowsNetworking.com contains a wealth of networking information for administrators: Featuring information on how to setup and troubleshoot various networks of any size. Also includes a comprehensive archive of hundreds of reviewed networking software and hardware solutions. Frequently updated with articles and tips by a team of leading authors, it remains a favorite within the networking community.


Rate this Tip
To rate tips, you must be a member of SearchNetworking.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Networking Solutions for Business

Alcatel-Lucent Network Business Communications Solutions

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts