Choon Ming Goh
2014-Mar-23 15:01 UTC
[Puppet Users] Powershell error 80040154, import-module, set-webconfigurationproperty
Hi all, I'm currently trying to set some web configuration properties through powershell using puppet but it is throwing me error. If I were to run the commands directly on the powershell it works. I'm running this on a Windows 2008 R2 server with WebServerRole. Please enlighten exec { 'SEMS disable Basis Authentication': command => 'C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -executionpolicy unrestricted -Command "Import-Module WebAdministration; Set-WebConfigurationProperty -filter /system.webServer/security/authentication/AnonymousAuthentication -name enabled -location SEMS -value false"', } Notice: Compiled catalog for win-uej5ngs6bua.docomointertouch.net in environment production in 1.80 seconds Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis Authentication]/returns: Set-WebConfigurationProperty : Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-BE1-6AF00DC944A6} failed due to the following error: 80040154. Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis Authentication]/returns: At line:1 char:62 Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis Authentication]/returns: + Import-Module WebAdministration; Set-WebConfigurationProperty <<<< -filter /system.webServer/security/authentication/AnonymousAuthentication -name enabled -location SEMS -value false Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis Authentication]/returns: + CategoryInfo : NotSpecified: (:) [Set-WebConfigurationProperty], COMException Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis Authentication]/returns: + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.SetConfigurationPropertyCommand Notice: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis Authentication]/returns: Error: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -executionpolicy unrestricted -Command "Import-Module WebAdministration; Set-WebConfigurationProperty -filter /system.webServer/security/authentication/AnonymousAuthentication -name enabled -location SEMS -value false" returned 1 instead of one of [0] Error: /Stage[main]/Profile::Iis::Sems/Exec[SEMS disable Basis Authentication]/returns: change from notrun to 0 failed: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -executionpolicy unrestricted -Command "Import-Module WebAdministration; Set-WebConfigurationProperty -filter /system.webServer/security/authentication/AnonymousAuthentication -name enabled -location SEMS -value false" returned 1 instead of one of [0] -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/91f6c261-4a10-42bd-a428-83e0e20c71bc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.