Partager via


IMSAdminBase2::Export

The Export method exports a section of the IIS metabase to a file for importing to the same IIS server or a different IIS server. Machine-specific and system-Specific information is omitted from the export file.

HRESULT Export(
      LPCWSTR pszPasswd,
      LPCWSTR pszFileName,
      LPCWSTR pszSourcePath,
      DWORD dwMDFlags
);

Parameters

  • pszPasswd
    [in] Encrypts the export file with the specified password. You can use any string as the password. The /d parameter 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 a metabase configuration.

  • pszFileName
    [in] Required. Specifies a unique name and location for the export file. If you specify an existing file or if the directories in the path you specify do not exist, the method fails. Also, the file path must be local. When exporting a file from a remote computer, the FileName parameter refers to a path on the remote computer.

  • pszSourcePath
    [in] Required. Specifies the metabase keys to export. Enter a metabase path, including /LM/ROOT, to indicate the selected keys.

  • dwMDFlags
    [in] A constant that specifies what inherit and merge flags to set. The constant can be one of the following.

    Value

    Meaning

    IMPORT_EXPORT_INHERITED

    Adds the inherited properties of the exported keys to the export file. Without this flag, the export file does not include properties inherited from higher-level keys. If you use this flag, the Export method adds the inherited properties of the exported keys to an IIsInheritedProperties key in the export file. When you import keys from this file, you can elect to import the inherited properties with the keys.

    IMPORT_EXPORT_NODE_ONLY

    Prevents the subkeys of the specified key from being added to the export file.

Requirements

Client: Requires or Windows XP Professional.

Server: Requires or Windows Server 2003.

Product: IIS

Header: Declared in iadmw.h; include iiscnfg.h.