Using the Remote Service

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

Prerequisites

To use the Web Deployment Agent Service (also called the Remote Agent Service), the following conditions must be true.

  1. You have installed the Web Deployment Tool on the remote computer.

  2. You have enabled port 80 through the firewall on the remote computer. By default, the remote agent listens on port 80. If you are using a custom port setting, you must enable the custom port through the firewall instead.

  3. You have started the Web Deployment Agent Service (MsDepSvc) on the remote computer. If necessary, you can start the service at an administrative command prompt by typing net start msdepsvc.

  4. You are a member of the administrator’s group on the remote computer, or you specify administrator credentials in the Web Deploy command by using the computerName=<serverName>,userName=<username>,password*=<password>* syntax described in the Usage section. For examples, see the Example Usages section later in this topic.

  5. You use an elevated command prompt to run the Web Deploy command.

Usage

To use the remote service at the Web Deploy command line, add the computerName provider setting to the source or destination provider by using the syntax: ,computerName=<host>. <host> is the name of the remote server. Only one destination computer can be specified in a Web Deploy command.

The following example shows how you can use the computerName provider setting to return metabase information from a remote computer named Server1. Notice that there is no space after the comma.

msdeploy -verb:dump -source:metakey=lm/w3svc/1,computerName=Server1

Web Deploy converts the computer name into the default Web Deploy URL. For example, computerName=Server1 will become https://Server1/MsDeployAgentService. If the remote service is running with a custom port or URL, you must specify the full URL. For more information about how to specify a custom URL, see Customizing and Securing the Remote Service.

To specify a user name and password for the remote server, you can use the userName and password provider settings. You can add these provider settings to the source or destination provider just as you do with the computerName provider setting.

Example Usages

1) Return the contents of the c:\msdeploy directory from a remote computer named Server2.

msdeploy -verb:dump -source:contentpath=c:\msdeploy\,computerName=Server2

2) Use the remote service on Server1 and Server2 to update the contents of a directory on Server2.

msdeploy -verb:sync -source:contentpath=c:\abc,computerName=Server1,username=admin,password=pass -dest:contentpath=c:\def,computerName=Server2,username=admin,password=pass

3) Use the c:\data directory on the local computer to update the c:\data directory on the remote computer named Server2.

msdeploy -verb:sync -source:contentpath=c:\data, -dest:contentpath=c:\data,computerName=Server2,username=admin,password=pass

4) Update a metabase key on a local Web server to match the metabase key on a remote Web server.

msdeploy -verb:sync -source:metakey=lm/w3svc/1,computerName=Server1,userName=administrator,password=MyPassKey -dest:metakey=lm/w3svc/2

See Also

Web Deploy Remote Service

Installing the Remote Service

Managing the Remote Service

Customizing and Securing the Remote Service