Iis 使用WebDeploy将应用程序池同步到远程主机

Iis 使用WebDeploy将应用程序池同步到远程主机,iis,iis-7,webdeploy,microsoft-web-deploy,Iis,Iis 7,Webdeploy,Microsoft Web Deploy,我正在尝试使用IIS凭据将应用程序池从本地计算机同步到远程服务器 这是我运行的命令 msdeploy.exe -verb:sync -source:appPoolConfig='MyAppPool' -dest:appPoolConfig, computerName='https://remoteserver.com:8172/MSDeploy.axd', use

我正在尝试使用IIS凭据将应用程序池从本地计算机同步到远程服务器

这是我运行的命令

msdeploy.exe 
          -verb:sync 
          -source:appPoolConfig='MyAppPool' 
          -dest:appPoolConfig,
                 computerName='https://remoteserver.com:8172/MSDeploy.axd',
                 userName='WebDeploy',
                 password='Pa$$word',
                 authtype='Basic',
                 includeAcls='False' 
          -enableLink:AppPoolExtension  
          -disableLink:CertificateExtension 
          -allowUntrusted 
但我一直在

Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("dev.dash.exceptron.com") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.

我可以很好地同步现有网站,但我无法创建网站或应用程序池。我认为这可能与我的用户有一个“站点”级别有关,而应用程序池不符合该级别。

发现了问题,似乎IIS凭据没有权限执行许多任务,使用
authtype='NTLM'
和Windows用户名和密码修复了问题

这个链接似乎也很有用,