Skip to main content
Answer needs confirmation
Question

You have two servers that have the Web Server (IIS) server role installed. The servers are configured as shown in the following table.

Both servers are configured to enable website deployment by using the Web Deployment Tool. Server1 hosts a website named Site1 that has Web Deploy
Publishing configured.
You plan to migrate Site1 to Server2.
You need to perform a pull synchronization of Site1 by using the Web Deployment Agent Service.
How should you complete the command? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

Proposed answer

Hot Area:

Suggested answer

 
Reference:
https://docs.microsoft.com/en-us/iis/publish/using-web-deploy/synchronize-iis

Comments
51007

Highly Voted 2 years, 6 months ago 

Agree with given answer- a 'pull sync' means you are syncing from a remote source to a local target. We are told to use a pull sync. The goal is to migrate the site FROM S1(remote source) TO S2(local target) so it is implied we are running the command at S2. You use 'apphostconfig' on both ends, but you dont need to specify compname for the -dest. "Pulling from a remote source, running on destination machine (the computerName argument identifies the remote source computer)."

upvoted 13 times 

GoforIT21

2 years, 4 months ago 

Yes, the link provided states exactly that. Thanks!

upvoted 2 times 

c7680da

Most Recent 7 months, 3 weeks ago 

chatgpt Command Construction Source: The source should specify the apphostconfig of "Site1" and the computername of Server1 since you are pulling the site configuration from Server1. Destination: The destination should specify the apphostconfig of "Site1" and the computername of Server2 since you are deploying the site to Server2. The correct command should look like this: plaintext Kód másolása msdeploy -verb:sync -source:apphostconfig="Site1",computername=Server1 -dest:apphostconfig="Site1",computername=Server2 Answer Area Selection Source: apphostconfig="Site1",computername=Server1 Destination: apphostconfig="Site1",computername=Server2 This command will pull the configuration of "Site1" from Server1 and deploy it to "Site1" on Server2.

upvoted 2 times 

c7680da

7 months, 3 weeks ago 

Summary: If running the command on Server2: Source: apphostconfig="Site1",computername=Server1 Destination: apphostconfig="Site1" By not specifying computername=Server2 in the destination when running the command on Server2, you are indicating that the destination is the local server where the command is being executed. This makes the command simpler and ensures it will correctly sync the configuration from Server1 to Server2.

upvoted 1 times 

[Removed]

1 year, 2 months ago 

Based on the reference to the Microsoft documentation on synchronizing IIS using Web Deploy, for a pull synchronization using the Web Deployment Agent Service, the msdeploy command should be completed as follows: -source: The source should specify apphostconfig and the computername of the remote source (Server1 in this case). -dest: The destination should only specify apphostconfig because the command is run on the destination server (Server2). So, the command will look like this: -source: apphostconfig="Site1",computername=Server1 -dest: apphostconfig="Site1" This indicates that Server2 (where the command is run) should pull the Site1 configuration from Server1​​.

upvoted 2 times 

syu31svc

1 year, 9 months ago 

From the link Pulling from a remote source, running on destination machine (the computerName argument identifies the remote source computer). msdeploy -verb:sync -source:apphostconfig="Default Web Site",computername=Server1 -dest:apphostconfig="Default Web Site" -whatif > msdeploysync.log Answer is correct

upvoted 2 times 

xxxxx85xx

2 years, 9 months ago 

Correct Answer

upvoted 3 times