Hi
I have a powershell deployment script that downloads files from svn to a directory and then updates IIS settings to specify the site in a new folder. It works fine until some updates have been made on the server. Now when I try to run the script, errors on
[Void][Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration") $serverManager = New-Object Microsoft.Web.Administration.ServerManager
Error
New-Object : Exception calling ".ctor" with "0" argument(s): "Retrieving the COM class factory for component with CLSID {B15183DD-75F9-42DF-8E57-C8B57692F134} failed due to the following error: 80040154." At C:\Users\administrator.LAYERXNETWORKS\AppData\Local\Temp\2\e72ec49f-353f-4dc0-877c-ef67f6b49bab.ps1:2 char:28 + $serverManager = New-Object <<<< Microsoft.Web.Administration.ServerManager + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
I read that this error is usually caused by the fact that the class is not installed.
The server is running Windows 2008 R2 with IIS 7.5
source share