6
Tôi gọi lệnhngoại lệ ném khi tạo một trang web thông qua Invoke-Command
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 }
Trang web này được tạo thành công trong IIS trên máy từ xa. Tuy nhiên, một thông báo ngoại lệ được hiển thị khi powershell trả về:
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
Có ai biết tại sao tôi nhận được thông báo này và cách tôi có thể giải quyết không?
Tuyệt vời. Cảm ơn! –
+1. Piping nó để null cũng hoạt động: '| Out-Null' –