Red Gate forums :: View topic - IIS web site PostScript.PS1 errors -agent rights OK?
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

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

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
zorrow



Joined: 18 Sep 2013
Posts: 2
Location: Canada

PostPosted: Wed Sep 18, 2013 9:08 pm    Post subject: IIS web site PostScript.PS1 errors -agent rights OK? Reply with quote

Hello there!

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

Code:

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:

Code:
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

Code:
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!
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Thu Sep 19, 2013 9:02 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
zorrow



Joined: 18 Sep 2013
Posts: 2
Location: Canada

PostPosted: Thu Sep 19, 2013 10:34 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Thu Sep 19, 2013 10:39 am    Post subject: Reply with quote

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 support@red-gate.com)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group