- Using declareParam and setParam to change the application name
Firstly, create an archive (or package) and declare a parameter
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3>msdeploy -verb:sync -source:apphostconfig="default web site\Testweb" -dest:archivedir="C:\deploytest" -declareparam:name=appName,kind=providerpath,scope=apphostconfig
Then, specify a value at synchronization time
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3>msdeploy -verb:sync -source:archivedir="C:\deploytest" -dest:auto -setparam:name=appName,kind=providerpath,sc ope=apphostconfig,value='default web site/TestwebDeploy'
http://technet.microsoft.com/en-us/library/dd569084(v=WS.10).aspx#BKMK_ParameterKindSettings
2. Using declareParam and setParam to change settings in web.config
Sample configuration:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appSettings>
<add key="poolSize" value="30"/>
<add key="LoggingStatus" value="OFF" />
</appSettings>
</configuration>
Commands:
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3>msdeploy -verb:sync -source:a
pphostconfig="default web site/testservice" -dest:archivedir=c:\test -declarepar
am:name=param1,kind=XmlFile,scope="web.config",match="/configuration/appSettings
/add[@key='poolSize']/value"
C:\Program Files (x86)\IIS\Microsoft Web Deploy V3>msdeploy -verb:sync -source:a
rchivedir=c:\test -dest:auto -setparam:name=param1,value=50 -verbose
3....