I call the 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 }
The website was successfully created in IIS on a remote computer. However, an exception message is displayed when powershell returns:
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
Does anyone know why I am receiving this message and how can I solve it?
source share