HI,
I have a powershell deployment script that downloads files from svn into a directory and then updates the IIS settings to point the site at the new folder. It has been running fine, until some updates were made to the server. Now, when I try and run the script it errors out on
[Void][Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Administration")
$serverManager = New-Object Microsoft.Web.Administration.ServerManager
The error is
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 ahve read that this error is generally caused by the class not being installed.
The server is running Windows 2008 R2 with IIS 7.5