Editor's note: This is the third part in a continuing interactive series on scripting that appears on SearchWinSystems.com...
monthly. You can send any scripting questions to the author, Christa Anderson, at firstname.lastname@example.org.
Here's a situation that I bet many of you can relate to: I recently began a new contract at a very large company. While getting started, I needed to find all the information I'd be working with, and it was not a simple task. Some shares were on public servers, but some were on personal computers. Then there was the problem of identifying a printer: I'm working in a very large building, so I had to know which printer was closest.
This month's script will connect users to shared resources according to their user name. I'll also show you a variation that allows you to connect to resources based on computer name, an option often more appropriate for printers and other location-based resources where it matters less who you are than where you are.
Once you understand this script, you'll not only be able to map network resources for people or machines, but you will also know one way to identify network resources programmatically, one way to identify users and computers for a script and how to use two kinds of conditional statements. This version of the script does not require Active Directory or even SAM domains -- we'll get to those in later columns.
Scripting: Connect users to network resources
Set your goals
Read all of Christa's scripting columns:
April 2005: Beginner's guide to scripting
May 2005: It's time to increase your scripting expertise
June 2005: Connect users to network resources
July 2005: More on connecting to network resources
August 2005: Find objects with Windows Scripting Host
September 2005: Windows Script Host arguments
October 2005: Scripting School: Turning the environment with WshShell
|ABOUT THE AUTHOR:|
| Christa Anderson
When Christa Anderson began working with Windows Server operating systems in 1992, she became increasingly interested in finding more efficient and flexible ways of performing routine tasks. Christa has written extensively about administrative scripting and taught technical sessions on the subject at conferences such as Comdex and CeBIT, helping people who had never done any scripting to write their own scripts in half a day. In addition to her interest in scripting Windows management, Christa is an authority on server-based computing and the program manager for Terminal Services licensing in Longhorn. If you have a scripting question for Christa, please e-mail her at scripting@SearchWinSystems.com.