Freigeben über


IIS-Sync Configuration Settings Only - No Web Site Content

In the scenario where you make a modification of an IIS setting at the server level (not in the website or web application) and want to synchronize the settings (no content) with other servers. It is important to understand the following script will only synchronize the settings aligned with the IIS server and not the web sites.

Web Deploy must be installed on the source and target server and this method uses the remote Web Deploy agent to authenticate and synchronize the changes.

 

 

 

 

 

The following script authenticates with the remote server using the credentials you are logged into the source server and will run in a trusted domain model. Add the username and password parameters to the -dest: command to indicate the remote server authentication method.

The -disableLink:Content extension prevents content from being synchronized and the settings -skip:xPath=//site -skip:objectName=section,absolutePath=system.applicationHost/applicationPools command prevents the websites and applications from being established on the remote server. If this is skipped, the websites and application pools that do not exist on the remote server are created and the content is not copied over and the websites are empty.

msdeploy -verb:sync -source:webServer -dest:webServer,computerName=10.2.0.9 -disableLink:Content -disableLink:CertificateExtension -skip:xPath=//site -skip:objectName=section,absolutePath=system.applicationHost/applicationPools -whatif

Drop the -whatif to commit the changes to the remote server.