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 


August 2001

Using VBScript Programs to Track Your Web Sites

RSS
Subscribe to Windows Web Solutions | See More Task Automation Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

This month, I show you a simple VBScript program that lists the Web sites on any server to which you have access on your LAN or WAN. The script comes in two versions: listwebappsany.vbs, which Listing 1 shows, and listwebappsanytofile.vbs, which Listing 2 shows. Listwebappsany.vbs displays the number, name, and server name for each Web site on the server or on a remote server if you specify the server's name. The second script performs the same tasks but writes the results to the C:\scripts\listwebapps.txt file. The scripts use Microsoft Active Directory Service Interfaces (ADSI) to talk to the IIS metabase and extract the Web site information. Of course, to execute the scripts successfully, you must have the proper security permissions to the resources that those scripts use (e.g., metabase, file system).

These scripts are useful for discovering the Web sites on a local or remote server either interactively or by calling the script from another application. This versatility lets you inspect or gather information about Web sites on any system to which you have access. In addition, the scripts make it easy to perform the search in one step. Also, the scripts are faster than using Internet Services Manager (ISM) to explore the remote systems. Because the program is written in VBScript, you can paste portions of scripts from other files into the VBScript file to modify it to perform other tasks.

Using Listwebappsany.vbs
You can run listwebappsany.vbs without arguments to display the Web sites on your local system. To display the Web sites on another system, execute the program and specify the name of the remote system as a parameter.

For example, executing the command

ListWebAppsAny

on my notebook computer displays the results that Figure 1 shows. In Figure 1, the name of the server appears as LOCALHOST, which is the default server name and points to the current server. To execute the program on a remote server, use the command

ListWebAppsAny servername

where servername is the server on which you want to list the applications.

   Previous  [1]  2  Next 


Top Viewed ArticlesView all articles
CES 2009: Ballmer Announces Windows 7, Windows Live, Live Search Milestones

During his first-ever Consumer Electronics Show (CES) 2009 keynote address last night in Las Vegas, Microsoft CEO Steve Ballmer announced the pending public availability of a feature-complete Windows 7, the final version of Windows Live Essentials, and ...

10 Reasons to Deploy Windows Vista

The decision to upgrade your XP systems to Vista is simple when you consider features such as easier backup, a great desktop search, and vastly improved security options. ...

10 Reasons Not to Deploy Windows Vista

The decision to upgrade to Vista has to make business sense, but many companies find the costs in training and application compatibility problems outweigh any benefits Vista brings. ...


Task Automation Whitepapers Essential Guide to E-discovery and Recovery for Microsoft Exchange

Continuous Data Protection and Recovery for Microsoft Exchange

Protecting (You and) Your Data with Exchange Server 2007

Related Events Concrete Ways to Make Sure Your SharePoint Deployment Doesn't Blow Up

Delivering Reliable and Effective Web-Based Applications

Making Web Application Perform Better: What to Watch, How to Watch It, and How to Fix It

Check out our list of Free Email Newsletters!

Task Automation eBooks Spam Fighting and Email Security for the 21st Century

A Guide to Windows Certification and Public Keys

Keeping Your Business Safe from Attack: Patch Management

Related Task Automation 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 © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing