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 


July 2001

IIS Informant: Managing IIS 5.0 from NT

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

I'm using Microsoft Active Directory Service Interfaces (ADSI) to run administrative scripts on IIS 4.0. However, when I attempt to use those scripts to manage an IIS 5.0 server remotely, the script fails. Do compatibility problems exist with ADSI, IIS 5.0, and IIS 4.0?

ADSI is the means by which you can use a script to modify metabase settings. You can write your code in VBScript or JScript (Microsoft's implementation of JavaScript), then place this code in Active Server Pages (ASP) or Windows Script Host (WSH) files. Using ASP and ADSI, you can access and modify the IIS metabase as well as other databases, such as Windows 2000 Active Directory (AD) or the Windows NT 4.0 user database.

Many IIS administrators haven't fully embraced scripting as a means of IIS administration. So, I'd like to give you some reasons why you need to get started with scripting (if you haven't already):

  • You can perform many tasks with scripting that you simply can't accomplish in the UI. For example, you can set many tuning adjustments and security and authentication settings only by modifying the metabase.
  • You can remotely create, modify, or troubleshoot IIS.
  • You can automate the task of creating Web sites and virtual directories. This ability can be quite useful for ISPs, for example, who might create tens or hundreds of Web sites daily and need each of them to be identical. A script can be made available to administrators to query for relevant information such as a username and password, create a user account, create a Web site, assign a default page, install FrontPage Server Extensions, and perform other tasks. Such a script could be connected to an order entry system so that Web sites are created immediately upon placing an order.
  • You can iterate through your sites and servers and apply uniform updates and changes or automatically create backups of the metabase.
  • In IIS 5.0, you can extend the metabase with custom properties and values to create globally accessible variables and settings.

Microsoft has installed on your Win2K/IIS 5.0 and NT/IIS 4.0 servers a set of sample administrative scripts for you to use. One of the most frequently asked questions I receive is, How can I use a script to stop and start a Web site? Scripts for that and other purposes are provided in \inetpub\adminscripts (in IIS 5.0) and \winnt\system32\inetsrv\adminsamples (in IIS 4.0). Microsoft provides many more scripts in the Microsoft Internet Information Server 4.0 Resource Kit.

In addition to having access to details about IIS, ADSI lets you inquire about server status, user and group account information, and other information related to server services. Using ADSI, you can route the user to a Web page based on group membership. If you want to take a quantum leap in your IIS administrative skills, you've got to learn something about ADSI scripting.

To answer the question, ADSI lets you use a script to modify the metabase, but IIS 5.0 and IIS 4.0 have different metabase schemas (i.e., structures). Consequently, if you try to use ADSI on an NT 4.0 server to modify the metabase on an IIS 5.0 server, the script fails. The reverse is also true. Fortunately, Microsoft has a fix for this bug, but you have to ask for it. See the Microsoft article "Can't Administer IIS by Using ADSI on Windows NT 4.0 IIS 4.0 from Windows 2000 IIS 5.0 and Vice Versa" (http://support.microsoft.com/support/kb/articles/q262/7/39.asp) for details. NT 4.0 isn't installed with a full feature set for ADSI, so you need to download the latest version of ADSI from http://www.microsoft.com/ntserver/nts/downloads/other/adsi25/default.asp.

To learn about ADSI scripting, go to http://www.microsoft.com/technet, then search on ADSI. You'll find many articles, examples, and white papers about the topic. In addition, you can find books about ADSI at http://www.wrox.com and online articles at http://www.15seconds.com.

End of Article



Reader Comments
Regarding IIS 5.0, how can vitual webs be started and stoped with scheduled tasks (Scripts).
Thanks

Freidoon Parvizi June 23, 2004


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
No Jobs, No Excitement at Apple's Last Macworld Keynote

Apple CEO Steve Jobs made the right move in skipping out on his company's last appearance at Macworld: In a Tuesday keynote address at the conference, Apple had no interesting new products to sell, opting instead to spend mind-numbing amounts of time on ...

Home Tech? Work Tech? Increasingly, It's Just Tech

Paul discusses how the consumer market is influencing business technology in ways that are unprecedented. ...

Where is Microsoft NetMeeting in Windows XP?

...


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