IISCnfg.vbs - IIS Settings Replication
page 3 of 3
by Web Team at ORCS Web
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 23934/ 44

Removing the Password Requirement - IISCnfg2.vbs

The other default behavior with IISCnfg that I have adjusted is the unnecessary requirement to put in the username and password of the target server.  IISCnfig makes these required fields, so if you leave them off, the /copy command will not work.  If the user identity running the script has permission to the target server, it should be able to pass that through to the target server without requiring you to put the username and password in the batch file.  If you need to put the username/password in the batch file, that means that you need to maintain it over time and it also means that you have a username/password in plain text in your batch files or scripts.  Fortunately, it was easy to comment out the requirement to do that and it works perfectly without it.  So, the attached files include IISCnfg2.vbs which has that modification.  I made a comment with my name (Scott Forsyth) beside each line that I changed so that you can tell what was changed.

Included Files

With the theory behind us, let us take a look at the files included in the download file.  Note that I did not try to pretty it up or put a lot of error checking in it.  It is simple and easy to understand, but that also means that you may need to do some digging into the files to make any changes or to troubleshoot any issues that I did not handle in a friendly way.

[The first two files are the ones that you will use to do a Metabase Merge or Push.] MetabasePush.bat

Usage: MetabasePush {ServerIP} [SMTP FQDN]

You can call this from a batch file that can live somewhere else, like on the desktop of your primary web server.  It will do a metabase push from the current server (localhost) to the target server specified by the ServerIP.

You can optionally add the SMTP FQDN and it will update that on the target server.  We use that at ORCS Web because each server node has a different SMTP FQDN.


Usage: MetabaseMerge {ServerIP} [SMTP FQDN]

This operates the same as MetabasePush except that it does a Merge instead.  The ServerIP is required and the SMTP FQDN is optional.  Do not forget the differences mentioned above between a Push and Merge.  This file calls RemoveAdminACLLine.vbs so that the target server retains its own security settings.

[The following files are helper files and do not need to be run directly.]


This is a copy (confirmed up to date May 2006) of IIsCnfg.vbs, but with two minor modifications to make the target username and password optional.


This is an untouched Microsoft script to view and update the metabase ACLs permissions.


This is used by MetabaseMerge.bat to remove the ACL lines so that the permissions on the target server are left untouched during a Merge.


This will change the fully qualified domain name of the SMTP server on the target server that you specify.  It is used when there are different SMTP DNS names on each server.


I am sure you can guess.

To utilize these scripts, simply extract the set of files to a folder on your server and then call MetabasePush.bat and MetabaseMerge.bat from your own batch files.  For example, you could create a batch file on the desktop of your primary web server that has the following in it.

Listing 3

--Metabase Merge.bat--
 d:\admin\ClusterUtils\MetabaseMerge.bat web2.domain.com
 d:\admin\ClusterUtils\MetabaseMerge.bat web3.domain.com
 d:\admin\ClusterUtils\MetabaseMerge.bat web4.domain.com
 d:\admin\ClusterUtils\MetabaseMerge.bat web5.domain.com
 d:\admin\ClusterUtils\MetabaseMerge.bat web6.domain.com

If you double click on that file, it will do a Merge to the various servers on a WebFarm.  This assumes, of course, that you placed the files in d:\admin\ClusterUtils\.


[Download Sample]

That is it!  I hope that you have found this useful and are able to utilize parts or all of it in your environment.

Scott Forsyth is Director of IT at ORCS Web, Inc. - a company that provides managed complex hosting for clients who develop and deploy their applications on Microsoft Windows platforms.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-07-15 4:39:36 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search