Home > Commands A-M > Commands I

IISCNFG


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Imports and exports all or selected elements of an Internet Information Services (IIS) metabase on a local or remote computer, or copies the entire IIS configuration (metabase and schema) to another computer to replicate a configuration.


Syntax

IISCNFG[.VBS] [/copy | /export | /import | /save] /?

IISCNFG[.VBS] /copy /ts target_computer /tu target_user /tp target_password [/s computer [/u [Domain\]User [/p password]]]

IISCNFG[.VBS] /export [/children] [/d encryption_password] /f [Path\]file_name.xml [/inherited] /sp metabase_path [/s computer [/u [Domain\]User [/p password]]]

IISCNFG[.VBS] /import [/children] [/d encryption_password] /dp metabase_path /f [Path\]file_name.xml [/inherited] [/merge] /sp metabase_path [/s computer [/u [Domain\]User [/p password]]]

IISCNFG[.VBS] /save [/s computer [/u [Domain\]User [/p password]]]


Parameters

none.


Switches
/? (NT2003)
Display help.
/children (NT2003)
When exporting, recursively adds the subkeys of the specified key to the export file.
When importing, recursively imports the subkeys of the specified key.
/copy (NT2003)
Copies the IIS metabase and schema from one computer to another.
The copy operation uses IISBack.vbs to make a backup copy of the source metabase and the schema. Then, it copies the backup copy files (.MDX and .SCX) to the target computer and uses IISBack.vbs to replace the metabase and schema of the target computer with the backup copy. Although you can do these operations manually, the copy operation provides a convenient, one-step method to replicate an IIS configuration.
The copy operation does not copy server content associated with the IIS configuration, such as Web pages and FTP files.
The copy operation changes the computer-specific and system-specific properties in the metabase so that they are valid on the target computer. However, it does not adjust the directory or file paths. As a result, paths in the configuration might not be valid on the target computer.
The /copy switch replaces the functionality of IISSync.vbs and IISRepl.vbs, tools formerly included in Windows.
/d encryption_password (NT2003)
When exporting, encrypts the export file with the specified password. You can use any string as the password.
Creates a secure export file by encrypting the session key and secure properties with the specified password. You must provide the password to use the file in an /import operation.
If you omit this parameter or omit the password argument, then the export file is encrypted with a blank password. As a result, only the secure properties are encrypted and any Administrator can use the export file to import the metabase configuration.
When importing, specifies the password that was used to encrypt the configuration data.
Required when the configuration file is encrypted. If you do not provide the password for an encrypted file, or if you provide an incorrect password, the command fails.
/dp metabase_path (NT2003)
Specifies where in the metabase where the imported keys are placed. Enter a metabase path.
If you specify a path that already exists in the metabase, the imported keys overwrite and replace the keys currently in that metabase path without warning.
/export (NT2003)
Copies all or part of an IIS metabase to an XML file, in an encrypted or unencrypted format. The XML file can then be used in an import operation to copy all or part of the metabase to another IIS configuration.
/f [Path\]file_name.xml (NT2003)
Specifies a unique name and location for the export file.
When exporting, if you specify an existing file or if the directories in the path you specify do not exist, the command fails.
The file path must be local. When exporting/importing a file from a remote computer, the /f switch refers to a path on the remote computer.
/import (NT2003)
Adds configuration settings from an XML metabase export file to the metabase of an IIS server.
/inherited (NT2003)
When exporting, adds inherited properties of the exported keys to the export file. If omitted, the export file does not include properties inherited from higher-level keys.
When importing, imports the inherited properties of the keys. This switch is effective only when the source file includes inherited properties.
/merge (NT2003)
Combines keys in the XML file with the existing metabase keys. Without this switch, the keys in the XML file replace existing keys in the same metabase path.
This switch adds keys to the metabase that appear only in the XML file, retains keys in the metabase that are not in the XML file, and applies the values in the XML file when a key appears in both the XML file and the metabase.
/p password (NT2003)
Specifies the password of the user account that is specified in /u. If omitted, you will be prompted.
/s computer (NT2003)
Copies, exports, imports or saves the current Internet Information Services (IIS) metabase from the specified computer to the target computer. The default is the local computer.
/save (NT2003)
Saves the IIS metabase and schema to disk.
Any changes made to the metabase, using scripts or IIS Manager, are written to memory first first and to disk at the next scheduled update, which may be several minutes later. As a result, an administrator may make metabase changes and then open metabase.xml only to find the changes aren't reflected. The /save command resolves the problem by saving changes to the disk immediately.
/sp metabase_path (NT2003)
When exporting, specifies the metabase keys to export. Enter a metabase path to identify the selected keys.
When importing, specifies the location in the XML file of the keys being imported. Enter the metabase path as it appears in the XML file. To import all of the keys in the source file, enter the metabase path of the root key.
Use quotation marks to enclose metabase path elements that include spaces. Enclose only the element with spaces, not the entire path.
/tp target_password (NT2003)
Specifies the password for the account specified by the /tu switch.
/ts target_computer (NT2003)
Copies the IIS metabase to the specified computer. Type the IP address or computer name without backslashes.
/tu target_user (NT2003)
Specifies the account used to connect to the target computer. Type a user account in [Domain]\User format. This account must be a member of the Administrators group on the target computer.
This switch is required, even when the current user of the local computer is an Administrator of the target computer.
/u [Domain\]User (NT2003)
Runs the command with the account permissions of the user specified by User or Domain\User. The default is the permissions of the current logged on user on the computer issuing the command. Required when the current user is not an Administrator of the remote computer.

Related

none.


Notes

To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using "Run as" to perform this procedure.

The imported key must be the type expected in its new position in the metabase path. If the key is not the expected type, the configuration will not operate properly.

Changes made are effective immediately. These changes are reflected in the MetaBase.xml file when the file is updated (every five minutes or every 50 changes).


Examples

none.


Errorlevels

none.


Availability
External
DOS
none
Windows
none
Windows NT
NT2003