6
建立一個網站時,我調用命令異常通過調用命令
Invoke-Command -computername remotepc {
Import-Module WebAdministration;
New-Website -Name www.somesite.com -ApplicationPool www.somesite.com -hostHeader www.somesite.com -physicalPath c:\inetpub\wwwroot }
網站成功創建在IIS中的遠程計算機上拋出。但是,PowerShell返回時會顯示一條異常消息:
Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))
+ CategoryInfo : NotSpecified: (:) [New-Website], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.NewWebsite
Command
有誰知道我爲什麼收到此消息以及如何解決它?
太棒了。謝謝! –
+1。將它配置爲null也是可行的:'| OUT-Null' –