以下代码部分同步站点:
$spp = $path.Get_Item($name)$publishsettings = Get-WDPublishSettings -filename $_.Fullname$sync = Sync-WDSite $name $name -sitephysicalpath $spp ` -SourcePublishSettings $publishsettings ` -IncludeApppool ` -WarningAction Continue ` -sourcesettings $settings ` -ErrorAction Continue ` -destinationsettings $settings ` -deBUG
我得到的错误是以下(错误是德语,但我试图将其翻译成英语):
Sync-WDSite : The parameter 'Web Application Physical Path Parameter' was already defined.In C:\Users\administrator\desktop\wdeploy.ps1:236 Zeichen:17+ $sync = Sync-WDSite $name $name -sitephysicalpath $spp `+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + categoryInfo : InvalIDOperation: (:) [Sync-WDSite],DeploymentException + FullyQualifIEdErrorID : Microsoft.Web.Deployment.PowerShell.SyncSite
我完全不知道它来自哪里.
请注意,我使用-deBUG参数来查看cmdlet执行的每个步骤.错误发生在其他站点收集有关站点的信息的阶段(哪个站点是它,它使用哪个apppool等)
谢谢!
编辑:
附加信息:
每个站点的发布设置文件具有完全相同的结构,如下所示:
<?xml version="1.0" enCoding="utf-8"?><publishData> <publishProfile publishUrl="https://server:port/msdeploy.axd" msdeploySite="Sitename" destinationAppUrl="http://anysiteurl.domain.com:port/" MysqLDBConnectionString="" sqlServerDBConnectionString="" profilename="Default Settings" publishMethod="MSDeploy" username="server\wdeployadmin" userPWD="***" msdeployAllowUntrustedCertificate="True" agentType="wmsvc" useNTLM="False"/></publishData>
编辑:
Martin要求的完整错误消息:
writeErrorStream : TruePSMessageDetails :Exception : Microsoft.Web.Deployment.DeploymentException: Der Parameter 'Web Application Physical Path Parameter' wurde bereits definIErt. bei Microsoft.Web.Deployment.DeploymentSyncParameterCollection.Add(DeploymentSyncParameter parameter) bei Microsoft.Web.Deployment.PowerShell.WDeployCmdletBase.ProcessUserCmd()Targetobject :categoryInfo : InvalIDOperation: (:) [Sync-WDSite],DeploymentExceptionFullyQualifIEdErrorID : Microsoft.Web.Deployment.PowerShell.SyncSiteErrorDetails : Der Parameter 'Web Application Physical Path Parameter' wurde bereits definIErt.InvocationInfo : System.Management.automation.InvocationInfoScriptStackTrace : bei <ScriptBlock>,C:\Users\administrator\desktop\wdeploy.ps1: Zeile 245 bei <ScriptBlock>,C:\Users\administrator\desktop\wdeploy.ps1: Zeile 232 bei <ScriptBlock>,<Keine Datei>: Zeile 1PipelineIterationInfo : {0,1}解决方法 您可以使用msdeploy.exe -verb:sync而不是Sync-WDSite作为解决方法. 总结
以上是内存溢出为你收集整理的powershell – Sync-WDSite Web应用程序物理路径参数全部内容,希望文章能够帮你解决powershell – Sync-WDSite Web应用程序物理路径参数所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)