IIS web site PostScript.PS1 errors -agent rights OK?

zorrowzorrow Posts: 3
edited September 19, 2013 5:39AM in Deployment Manager
Hello there!

I'm running the following PostScript.PS1 script after deploying my site in IIS:
Import-Module WebAdministration

$appPath = "Default Web Site\MyWebsite"
$appPoolName = "MyWebsite"
$userAccountName = "MY_DOMAIN\MY_ACCOUNT"
$userAccountPassword = "mypassword"

Set-ItemProperty -Path IIS:\AppPools\$appPoolName -Name processmodel.identityType -Value 3
Set-ItemProperty -Path IIS:\AppPools\$appPoolName -Name processmodel.username -Value $userAccountName
Set-ItemProperty -Path IIS:\AppPools\$appPoolName -Name processmodel.password -Value $userAccountPassword

Set-WebConfigurationProperty -filter /system.WebServer/security/authentication/AnonymousAuthentication -name enabled -value false -PSPath IIS:\Sites\$appPath
Set-WebConfigurationProperty -filter /system.WebServer/security/authentication/windowsAuthentication -name enabled -value true -PSPath IIS:\Sites\$appPath

When I run this in the Powershell console with administrator rights on my Windows 2008 R2 server, it works perfectly.

However, when I run it with the deployment manager, I'm getting the following errors for every call to Set-ItemProperty and to Set-WebConfigurationProperty:
ERROR: Set-ItemProperty : Cannot retrieve the dynamic parameters for the cmdlet. Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
ERROR: At D:\WebApps\CDPQ.ESB\CDP.ESB.Services\PostDeploy.ps1:9 char:17
ERROR: + Set-ItemProperty <<<<  -Path IIS:\AppPools\$appPoolName -Name processmodel.identityType -Value 3
ERROR:     + CategoryInfo          : InvalidArgument: (:) [Set-ItemProperty], ParameterBindingException
ERROR:     + FullyQualifiedErrorId : GetDynamicParametersException,Microsoft.PowerShell.Commands.SetItemPropertyCommand
ERROR: Set-WebConfigurationProperty : Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
ERROR: At D:\WebApps\CDPQ.ESB\CDP.ESB.Services\PostDeploy.ps1:14 char:29
ERROR: + Set-WebConfigurationProperty <<<<  -filter /system.WebServer/security/authentication/windowsAuthentication -name enabled -value true -PSPath IIS:\Sites\$appPath
ERROR:     + CategoryInfo          : NotSpecified: (:) [Set-WebConfigurationProperty], COMException
ERROR:     + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.SetConfigurationPropertyCommand

What's happening here? What can I do about this? Can you please help me?

Thanks in advance!


  • I've contacted you directly about this- but for the benefit of others, please try updating to the latest build (2.2.12 or newer) and seeing how this affects things.
    Systems Software Engineer

    Redgate Software

  • Did you guys make a release yesterday to publish this fix for everybody? That’s just plainly awesome!

    The update did resolve the problem. I just:

    1- Downloaded the new Delivery Manager installer and re-installed it on the server.
    2- Downloaded the new agent installer and re-installed it on every target machine.
    3- In my Delivery Manager portal, opened the Environments tab. Every target machine's agent was still showing a "Needs update" message. Just clicked on "Edit" on every agent, saved and then the agent re-checked its status and became "Online".
    4- Now, I created a new release for my project and successfully deployed it on every environment.

    Everything works now.

    Thank you!

    PS: By the way, I'll be initiating the purchase of an enterprise licence of this product today. Mine's is a big organization and it will take a couple of days (or maybe even a couple of weeks) to complete all the process, but this is gonna happen for sure. Thanks again!
  • I think there had been one or two issues where the different versions of powershell were related, so that was the main change yesterday- we're aiming to put out a release every Wednesday at the moment. Glad that worked, do contact us again if you need anything further (you can always raise a ticket at redgatesupport.zendesk.com or email [email protected])
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.