Partager via


Web Deploy metaKey Provider

Applies To: Windows 7, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows XP

metaKey

Displays or synchronizes IIS 6.0 metabase keys.

Example

msdeploy -verb:sync -source:metaKey=lm/w3svc/1,metaDataGetInherited=true -dest:metaKey=lm/w3svc/2

The metaKey provider can be used to display or synchronize IIS 6.0 metabase keys, including subkeys and properties. For IIS 6.0, the provider can take a valid metabase path input (such as lm/w3svc/1/root or /lm/w3svc/1/root), or a site name as found in the ServerComment property of the Web site in the MetaBase.xml file (for example, "Fabrikam Site 1").

Important

You must configure special delegation rules before you can use the metakey=<siteName> or metakey=<siteName/applicationName> syntax when you also use the Web Deploy handler. For more information, see Enabling metaKey="siteName" Syntax.

In a dump operation, the metabase key paths and content file paths are returned for the metabase key that you specify by using the -source argument.

In a sync operation, the source and destination values for the metabase path can be different. However, they must be of the same Key Type (for example, IISWebVirtualDir or IISWebServer). If the metabase key exists on the target computer, the subkeys and properties underneath the key will be updated. If the key does not exist on the source, it will be deleted on the target. When you synchronize a Web site or Web application from IIS 6.0 to IIS 7, you should use the metaKey provider for both the source and dest arguments.

To copy only the configuration settings from server to server, but not the Web content, include -disableLink:ContentExtension in your Web Deploy command. For more information about link extensions, see Web Deploy Link Extensions.

Note

When a sync operation is performed from an IIS 6.0 source Web site or Web server to an IIS 6.0 destination Web site or Web server, the metabase ACLs are preserved. When a sync operation is performed from an IIS 6.0 source to an IIS 7 destination, the metabase ACLs are not transferred.

Warning

You should use the metaKey provider only if the source computer is using Windows Server 2003 (IIS 6.0) or Windows XP (IIS 5.1), or if you are synchronizing non-W3SVC configuration such as the IIS 6.0 FTP server (for example, metaKey=lm/msftpsvc). Do not use the metaKey provider or the webServer60 provider to synchronize from a Windows Server® 2008, Windows Vista®, Windows Server® 2008 R2 or Windows® 7 source computer to a Windows Server 2008, Windows Vista, Windows Server 2008 R2 or Windows 7 destination computer. In these cases you should use the appHostConfig provider to synchronize at the Web site level or the webServer provider to synchronize at the Web server level.

Provider Settings

The metaKey provider has two optional settings: MetaDataGetInherited and UseRealAbo.

MetaDataGetInherited

Adds inherited data for IIS 6.0 Web sites to the scope of an operation.

Usage: ,MetaDataGetInherited=<BOOL>

<BOOL> is either true or false. True if inherited data for IIS 6.0 Web sites are added to the scope; otherwise, false. For example, you can synchronize a Web site and get all data that Site1 inherits from the W3SVC parent level. The Web site will be set at the Site1 level on the destination. This modifier is used only for the metaKey provider. The default value is false.

UseRealAbo

Specifies that the Windows IIS 6.0 compatibility feature (ABO mapper) be used instead of the Web Deploy ABO mapper when synchronizations are performed from IIS 6.0 to IIS 7.

Usage: ,UseRealAbo=<BOOL>

<BOOL> is either true or false. A setting of true means the Windows ABO mapper will be used; false means that the built-in Web Deploy ABO mapper will be used. The default value is false.

Web Deploy normally uses its own version of ABO (Admin Base Objects) when synchronizing from IIS 6.0 to IIS 7. This allows you to perform the synchronization without having to install the IIS 6 compatibility feature (also known as the ABO mapper) separately on IIS 7. The UseRealAbo provider setting bypasses the Web Deploy ABO and uses the one installed with Windows. If you change UseRealAbo to true (not recommended), you must open the IIS 7 Server Manager to the Web Server Role and install the IIS 6 Metabase Compatibility role service.

Example usages

1) Display the metabase key and content file paths for the Web site at lm/w3svc/1.

msdeploy -verb:dump -source:metaKey=lm/w3svc/1

2) Synchronize metabase settings between the IIS 6.0 Web sites at lm/w3svc/1 and lm/w3svc/2.

msdeploy -verb:sync -source:metaKey=lm/w3svc/1 -dest:metaKey=lm/w3svc/2

3) Synchronize metabase settings between the IIS 6.0 Web sites at lm/w3svc/1 and lm/w3svc/2, and include all inherited data from the source site.

msdeploy -verb:sync -source:metaKey=lm/w3svc/1,metaDataGetInherited=true -dest:metaKey=lm/w3svc/2

4) Using metabase path names, copy the IIS 6.0 application App1 from Web site 1 to Web site 2, giving it the name "App2".

msdeploy -verb:sync -source:metakey="/LM/W3SVC/1/root/App1" -dest:metakey="/LM/W3SVC/2/ROOT/App2"

5) Using virtual path names, copy the IIS 6.0 application Contoso1 from "Main Site" to "New Site", giving it the name "Contoso2".

msdeploy -verb:sync -source:metakey="Main Site/Contoso1" -dest:metakey="New Site/Contoso2"

See Also

Concepts

Web Deploy appHostConfig Provider
Web Deploy webServer Provider
Web Deploy webServer60 Provider