Chapter 8. Programmatic Management of the IIS Metabase

   


Although most Windows NT administrative functions can be performed programmatically, some functions are unexposed to programmatic manipulation (such as setting the permissions on a share) or are too difficult to perform easily using script (such as login hours manipulation).

However, the Internet Information Server (IIS) 4.0 ADSI service provider implements a robust object model that allows you to manipulate almost every function in the IIS 4.0 Internet Service Manager Microsoft Management Console (MMC) snap-in. Just as the Windows Registry controls the configuration and operation of the Windows NT environment, the IIS Metabase is the namespace responsible for configuring IIS.

If you loaded the HTML Internet Service Manager when you installed the Windows Option Pack, look through the ASP samples in the %SystemRoot%\System32\InetSrv\IISAdmin directory. You will notice the object instantiations look surprisingly like the ADsPath binding strings you use to bind objects in the Windows NT service provider. This is because Microsoft chose ADSI as the strategic interface for programmatic IIS Metabase manipulation. Just as you can bind to the Windows NT SAM using the Windows NT namespace identifier, you can also manipulate the IIS Metabase by referencing the IIS ADSI service provider in the binding string.

This chapter will explore how you can use the power of ADSI to script IIS administrative tasks . Because of the robust object model implemented in IIS, this chapter covers topics germane to the entire server, including the following:

  • The IIS Metabase structure

  • The IIsComputer object

  • IIS site logging

  • Programmatic site management

  • Programmatic site operations

In this chapter, you will also begin the first of several exercises that will ultimately yield the creation of the IISAdmin.DLL COM server.


   
Top


Windows NT. 2000 ADSI Scripting for System Administration
Windows NT/2000 ADSI Scripting for System Administration
ISBN: 1578702194
EAN: 2147483647
Year: 2000
Pages: 194
Authors: Thomas Eck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net