Web Deploy Operation Settings

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

Web Deploy operation settings are non-provider specific command-line flags. They modify all of a Web Deploy operation. On the command-line prompt, each operation setting is preceded by a hyphen. The following lists the Web Deploy operation settings, their descriptions, and example usages.

Setting

allowUntrusted

Usage

-allowUntrusted

Description

When specified, untrusted SSL connections are allowed; otherwise, untrusted SSL Connections are not allowed.

Example

msdeploy -verb:sync -source:apphostconfig="Default Web Site" -dest:apphostconfig="Default Web Site",computername=Server2 -allowUntrusted

Setting

appHostConfigDir

Usage

-appHostConfigDir=<DirectoryPath>

Description

Specifies the path of the ApplicationHost.config file for the current instance of IIS Express. The default path is %SystemDrive%\Users\<UserId>\Documents\IISExpress8\config.

Example

Synchronize a WordPress site that is running on IIS Express to IIS on the computer IISWebServer1. Use the ApplicationHost.config file in the IIS Express configuration path for User1.

msdeploy -verb:sync -source:webApp="wordpress" -dest:auto,computername=IISWebServer1 -appHostConfigDir=c:\users\user1\documents\iisexpress\config

Setting

declareParam

Usage

-declareParam:name=<ParameterName>

,kind=<ParameterKind>

,scope=<ParameterScope>

,match=<RegularExpression>

,defaultValue=<string>

,description=<ParameterDescription>

Description

Creates a user-specified parameter for a package or archive. When the package or archive is later synchronized, the value of the declared parameter is specified by using -setParam. For more information, see Using declareParam and setParam.

Example

This example creates a package file based on the default Web site and declares a "param" parameter that will match the value attribute of <add> elements.

msdeploy -verb:sync -source:apphostconfig="Default Web Site" -dest:package=ParameterPackage.zip -declareParam:name=param,kind=XmlFile,scope=web.config,match=//add/@value

Setting

declareParamFile

Usage

-declareParamFile:<XMLFile>

Description

Specifies an XML file that contains declarations of parameters that will be used in an operation. The XML format of the declared parameters matches that of the parameters that are found in the archive or package.

Example

This example creates a package file from IIS 6.0 Site 1 and declares a parameters file called Myparams.xml.

msdeploy -verb:sync -source:metakey="lm\w3svc\1" -dest:package="c:\packages\myzip5.zip" -declareParamFile="c:\myparams.xml"

Setting

dest

Usage

-dest:<providerName>[=<pathToObject>[,<providerSetting>=<providerSettingValue>],…]

Description

Specifies the destination (the target object) of the operation that the -verb argument specifies. The <provider> and its associated settings more narrowly define the destination object or how it will be processed. For more information about providers, see Web Deploy Providers. For more information about provider settings, see Web Deploy Provider Settings.

Example

This example synchronizes the contents of the source Web site Fabrikam1 to the destination Web site Fabrikam2.

msdeploy.exe -verb:sync -source:contentPath="Fabrikam1" -dest:contentPath="Fabrikam2"

Setting

disableLink

Usage

-disableLink:<LinkExtensionName>, <LinkExtensionName>

Description

Disables one or more specified link extensions during a synchronization operation. The link extensions are specified after -disableLink in a comma-delimited list. You can specify the link extension names directly, or use regular expressions that resolve to valid Web Deploy link extension names.

The Web Deploy link extensions are AppPoolExtension, CertificateExtension, ContentExtension, FrameworkConfigExtension, and HttpCertConfigExtension. For more information about link extensions, see Web Deploy Link Extensions. For more information about regular expressions, see Regular Expressions. This setting does not apply to the dump operation.

Example

This example disables the ContentExtension so that no content is included in the operation.

msdeploy -verb:sync -disableLink:ContentExtension -source:archiveDir:c:\myArchive -dest:metakey=lm/w3svc/1

Setting

disableRule

Usage

-disableRule:<RuleName>, <RuleName>

Description

Disables the specified synchronization rule or rules during a synchronization operation. The rules are specified after -disableRule in a comma-delimited list. You can specify the rule names directly, or use a regular expression that resolves to valid Web Deploy rules. The specified rule name can also be followed by an asterisk wildcard character. For example, DependencyCheck* will specify that the rules DependencyCheckAppPoolExists, DependencyCheckFailOnError, DependencyCheckFailOnWarning, and DependencyCheckInUse will be disabled. For more information about rules, see Web Deploy Rules. This setting does not apply to the dump operation.

Example

This example allows content that is stored on UNC paths to be synchronized.

msdeploy -verb:sync -source:appHostConfig="Site1" -dest:appHostConfig="Site1",computerName=DestServer -disableRule:skipUNC

Setting

disableSkipDirective

Usage

-disableSkipDirective:<SkipDirectiveName>

Description

Disables the specified skip directive.

Example

This example disables the skip directive named ConfigProtectedData.

msdeploy -verb:sync -source:appHostConfig="Site1" -dest:appHostConfig="Site1",computerName=DestServer -disableSkipDirective:ConfigProtectedData

Setting

enableLink

Usage

-enableLink:<LinkExtensionName>, <LinkExtensionName>

Description

Enables one or more specified link extensions during a synchronization operation. The link extensions are specified after -enableLink in a comma-delimited list. You can specify the link extension names directly, or use regular expressions that resolve to valid Web Deploy link extension names.

The Web Deploy link extensions are AppPoolExtension, CertificateExtension, ContentExtension, FrameworkConfigExtension, and HttpCertConfigExtension. For more information about link extensions, see Web Deploy Link Extensions. For more information about regular expressions, see Regular Expressions. This setting does not apply to the dump operation.

Example

This example enables the AppPoolExtension so that application pools are included in the sync operation.

msdeploy -verb:sync -source:appHostConfig="Default Web Site" -dest:appHostConfig="Default Web Site",computerName=Server2 -enableLink:AppPoolExtension

Setting

enableRule

Usage

-enableRule:<RuleName>,<RuleName>

Description

Enables one or more synchronization rules during a synchronization operation. The rules are specified after -enableRule in a comma-delimited list. You can specify the rule names directly, or use a regular expression that resolves to valid Web Deploy rules. The specified rule name can also be followed by an asterisk wildcard character. For example, DependencyCheck* will specify that the rules DependencyCheckAppPoolExists, DependencyCheckFailOnError, DependencyCheckFailOnWarning, and DependencyCheckInUse will be enabled. For more information about rules, see Web Deploy Rules. This setting does not apply to the dump operation.

Example

This example applies the rule named "MyCustomSyncRule" to the synchronization operation.

msdeploy -verb:sync -source:archiveDir=c:\archive -dest:webServer -enableRule: MyCustomSyncRule

Setting

enableSkipDirective

Usage

-enableSkipDirective:<SkipDirectiveName>

Description

Enables the specified skip directive.

Example

This example enables the skip directive named ConfigProtectedData.

msdeploy -verb:sync -source:appHostConfig="Site1" -dest:appHostConfig="Site1",computerName=DestServer -enableSkipDirective:ConfigProtectedData

Setting

postSync

Usage

-postSync:<command>

Description

Runs the specified command or batch file on the destination after a synchronization completes. This operation setting uses the runCommand provider. For more information, see Web Deploy runCommand Provider.

Example

This example synchronizes content from the specified source to the specified destination, and then runs the Mybatchfile.bat batch file.

msdeploy -verb:sync -source:contentPath="C:\Test1" -dest:contentPath="C:\Test2" -postSync:runcommand="c:\MyBatchFile.bat"

Setting

preSync

Usage

-preSync:<command>

Description

Runs the specified command or batch file on the destination before a synchronization starts. This operation setting uses the runCommand provider. For more information, see Web Deploy runCommand Provider.

Example

This example runs the Mybatchfile.bat batch file before synchronizing the content from source to destination.

msdeploy -verb:sync -source:contentPath="C:\Test1" -dest:contentPath="C:\Test2" -preSync:runcommand="c:\MyBatchFile.bat"

Setting

removeParam

Usage

-removeParam:<command>

Description

Removes a parameter definition from the list of declared parameters.

Example

This example copies the Myzip.zip package file to the file called Myzip.2.zip, but removes the "MyParam" parameter from the resulting package.

msdeploy -verb:sync -source:package="c:\packages\myzip.zip" -dest:package="c:\packages\myzip2.zip" -removeParam:MyParam

Important

Setting