Mailbox Role Setup Error

Hello, when trying to install the Mailbox Role: Transport Service, I get the following error:

Error:
The following error was generated when "$error.Clear();
configure-WSManIISHosting -EnableKerberosModule;
" was run: "Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.".

Any ideas how to resolve this? I've tried everything.

Thank you.

January 27th, 2015 12:42pm

Sure. Here is the log.

[01/27/2015 14:17:29.0001] [1] Processing component 'WSMan IIS Hosting Configuration' (WSMan IIS Hosting Configuration Component).
[01/27/2015 14:17:29.0001] [1] Executing:
configure-WSManIISHosting -EnableKerberosModule;

[01/27/2015 14:17:29.0016] [2] Active Directory session settings for 'Configure-WSManIISHosting' are: View Entire Forest: 'True', Configuration Domain Controller: 'WIN-M9G032Q55DG', Preferred Global Catalog: 'WIN-M9G032Q55DG', Preferred Domain Controllers: '{ WIN-M9G032Q55DG }'
[01/27/2015 14:17:29.0016] [2] Beginning processing configure-WSManIISHosting -EnableKerberosModule:'True'
[01/27/2015 14:17:29.0047] [2] Changing the start type of WINRM service to Automatic Delayed...
[01/27/2015 14:17:29.0047] [2] Starting WINRM service...
[01/27/2015 14:17:29.0047] [2] Checking required files...
[01/27/2015 14:17:29.0125] [2] Checking required registry keys...
[01/27/2015 14:17:29.0125] [2] Checking current IIS configuration...
[01/27/2015 14:17:29.0141] [2] [ERROR] Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.
[01/27/2015 14:17:29.0141] [2] [ERROR] Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.
[01/27/2015 14:17:29.0141] [2] Ending processing configure-WSManIISHosting
[01/27/2015 14:17:29.0157] [1] The following 1 error(s) occurred during task execution:
[01/27/2015 14:17:29.0157] [1] 0. ErrorRecord: Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.
[01/27/2015 14:17:29.0157] [1] 0. ErrorRecord: System.InvalidOperationException: Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.
at Microsoft.Exchange.Configuration.Tasks.Task.WriteError(Exception exception, ErrorCategory category, Object target, Boolean reThrow, String helpUrl)
at Microsoft.Exchange.Configuration.Tasks.Task.WriteError(Exception exception, ErrorCategory category, Object target)
at Microsoft.Exchange.Management.Deployment.ConfigureWSManIISHosting.CheckIISConfigurationFile()
at Microsoft.Exchange.Management.Deployment.ConfigureWSManIISHosting.InternalProcessRecord()
at Microsoft.Exchange.Configuration.Tasks.Task.ProcessRecord()
[01/27/2015 14:17:29.0157] [1] [ERROR] The following error was generated when "$error.Clear();
configure-WSManIISHosting -EnableKerberosModule;
" was run: "Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.".
[01/27/2015 14:17:29.0157] [1] [ERROR] Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.
[01/27/2015 14:17:29.0157] [1] [ERROR-REFERENCE] Id=WSManIISHostingConfigurationComponent___5cd9e3f8000e4019bb27b9ffc70ab482 Component=EXCHANGE14:\Current\Release\Shared\Datacenter\Setup
[01/27/2015 14:17:29.0157] [1] Setup is stopping now because of one or more critical errors.
[01/27/2015 14:17:29.0157] [1] Finished executing component tasks.
[01/27/2015 14:17:29.0157] [1] Ending processing Install-BridgeheadRole
[01/27/2015 14:17:32.0199] [0] End of Setup
[01/27/2015 14:17:32.0199] [0] **********************************************

Here is the Ps1:

# Component tasks
#

# Tasks for 'WSMan IIS Hosting Configuration' component
# [ID = WSManIISHostingConfigurationComponent___5cd9e3f8000e4019bb27b9ffc70ab482, Wt = 1, isFatal = True] "WSMan IIS Hosting Configuration Component"
1/27/2015 9:17:29 AM:
configure-WSManIISHosting -EnableKerberosModule;


  • Edited by BFam355 Tuesday, January 27, 2015 2:55 PM
  • Proposed as answer by Slick869 Friday, February 27, 2015 3:10 PM
  • Unproposed as answer by Slick869 Friday, February 27, 2015 3:10 PM
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2015 2:53pm

is this a fresh install ? Can you open IIS Manager and check if you are able to locate Powershell Virtual Directory under "Default Website" ?

You might have to give more information about the setup and the latest changes made to the server.

January 27th, 2015 3:34pm

Yes, this is a fresh install, a really really fresh install. There isn't anything on the server as it's brand new, except IIS and the prereqs for Exchange. Yes there is 2 sites that Exchange made: Default Web Site, which has a  PowerShell virtual directory, and Exchange Back End, which also has a PowerShell VD. 
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2015 5:17pm

In your C:\ExchangeSetupLogs there will be a .Ps1 file which is recently created and will have the last modified date/time when the setup last failed.

Can you get the last few lines which says IsFatal=Trie, wt= <Some Value>. can you get the last 10 lines of text which is in that .Ps1 file and also last 10 lines from ExchangeSetup.log ?

January 27th, 2015 5:35pm

Sure. Here is the log.

[01/27/2015 14:17:29.0001] [1] Processing component 'WSMan IIS Hosting Configuration' (WSMan IIS Hosting Configuration Component).
[01/27/2015 14:17:29.0001] [1] Executing:
configure-WSManIISHosting -EnableKerberosModule;

[01/27/2015 14:17:29.0016] [2] Active Directory session settings for 'Configure-WSManIISHosting' are: View Entire Forest: 'True', Configuration Domain Controller: 'WIN-M9G032Q55DG', Preferred Global Catalog: 'WIN-M9G032Q55DG', Preferred Domain Controllers: '{ WIN-M9G032Q55DG }'
[01/27/2015 14:17:29.0016] [2] Beginning processing configure-WSManIISHosting -EnableKerberosModule:'True'
[01/27/2015 14:17:29.0047] [2] Changing the start type of WINRM service to Automatic Delayed...
[01/27/2015 14:17:29.0047] [2] Starting WINRM service...
[01/27/2015 14:17:29.0047] [2] Checking required files...
[01/27/2015 14:17:29.0125] [2] Checking required registry keys...
[01/27/2015 14:17:29.0125] [2] Checking current IIS configuration...
[01/27/2015 14:17:29.0141] [2] [ERROR] Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.
[01/27/2015 14:17:29.0141] [2] [ERROR] Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.
[01/27/2015 14:17:29.0141] [2] Ending processing configure-WSManIISHosting
[01/27/2015 14:17:29.0157] [1] The following 1 error(s) occurred during task execution:
[01/27/2015 14:17:29.0157] [1] 0. ErrorRecord: Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.
[01/27/2015 14:17:29.0157] [1] 0. ErrorRecord: System.InvalidOperationException: Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.
at Microsoft.Exchange.Configuration.Tasks.Task.WriteError(Exception exception, ErrorCategory category, Object target, Boolean reThrow, String helpUrl)
at Microsoft.Exchange.Configuration.Tasks.Task.WriteError(Exception exception, ErrorCategory category, Object target)
at Microsoft.Exchange.Management.Deployment.ConfigureWSManIISHosting.CheckIISConfigurationFile()
at Microsoft.Exchange.Management.Deployment.ConfigureWSManIISHosting.InternalProcessRecord()
at Microsoft.Exchange.Configuration.Tasks.Task.ProcessRecord()
[01/27/2015 14:17:29.0157] [1] [ERROR] The following error was generated when "$error.Clear();
configure-WSManIISHosting -EnableKerberosModule;
" was run: "Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.".
[01/27/2015 14:17:29.0157] [1] [ERROR] Application 'PowerShell' doesn't exist in the default Web site in 'C:\Windows\system32\inetsrv\config\ApplicationHost.Config'. Make sure the application isn't deleted from the default Web site.
[01/27/2015 14:17:29.0157] [1] [ERROR-REFERENCE] Id=WSManIISHostingConfigurationComponent___5cd9e3f8000e4019bb27b9ffc70ab482 Component=EXCHANGE14:\Current\Release\Shared\Datacenter\Setup
[01/27/2015 14:17:29.0157] [1] Setup is stopping now because of one or more critical errors.
[01/27/2015 14:17:29.0157] [1] Finished executing component tasks.
[01/27/2015 14:17:29.0157] [1] Ending processing Install-BridgeheadRole
[01/27/2015 14:17:32.0199] [0] End of Setup
[01/27/2015 14:17:32.0199] [0] **********************************************

Here is the Ps1:

# Component tasks
#

# Tasks for 'WSMan IIS Hosting Configuration' component
# [ID = WSManIISHostingConfigurationComponent___5cd9e3f8000e4019bb27b9ffc70ab482, Wt = 1, isFatal = True] "WSMan IIS Hosting Configuration Component"
1/27/2015 9:17:29 AM:
configure-WSManIISHosting -EnableKerberosModule;


  • Edited by BFam355 Tuesday, January 27, 2015 2:55 PM
  • Proposed as answer by Slick869 20 hours 21 minutes ago
  • Unproposed as answer by Slick869 20 hours 21 minutes ago
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2015 5:53pm

Hi BFam355,

Thank you for your question.

From error information, the ApplicationHost.config file has corrupted,

We could rename the ApplicationHost.config file, then we restart server to check if the issue persist.

Notice: Before we rename the original applicationhost.config, we must backup it.

If the I suggest we copy the new applicationhost.config from other server and replace the applicationhost.config to repair it, then we restart IIS:

C:\Windows\system32\inetsrv\config\ApplicationHost.Config

Notice: Before we replace the original applicationhost.config, we must backup it.

If there are any questions regarding this issue, please be free to let me know. 

Best Regard,

Jim

January 29th, 2015 1:32am

Hi BFam355,

Thank you for your question.

From error information, the ApplicationHost.config file has corrupted,

We could rename the ApplicationHost.config file, then we restart server to check if the issue persist.

Notice: Before we rename the original applicationhost.config, we must backup it.

If the I suggest we copy the new applicationhost.config from other server and replace the applicationhost.config to repair it, then we restart IIS:

C:\Windows\system32\inetsrv\config\ApplicationHost.Config

Notice: Before we replace the original applicationhost.config, we must backup it.

If there are any questions regarding this issue, please be free to let me know. 

Best Regard,

Jim

Free Windows Admin Tool Kit Click here and download it now
January 29th, 2015 4:32am

Were you able to fix this?  I just ran across this problem and was pulling my hair out for three days before I figured it out.

My Default Web Site was removed and I had to put it back in IIS.  When it was put back in, the Site ID was set to "2" instead of "1".  I edited my applicationHost.config file so that the Default Web Site was set to ID "1", bounced IIS and that fixed my issue.

File location:  C:\Windows\System32\inetsrv\config\applicationHost.config

File content was:



<site name="Default Web Site" id="2">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
                </application>
                <application path="/PowerShell" applicationPool="MSExchangePowerShellFrontEndAppPool">
                    <virtualDirectory path="/" physicalPath="C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:80:" />
                    <binding protocol="net.tcp" bindingInformation="808:*" />
                    <binding protocol="net.pipe" bindingInformation="*" />
                    <binding protocol="net.msmq" bindingInformation="localhost" />
                    <binding protocol="msmq.formatname" bindingInformation="localhost" />
                    <binding protocol="https" bindingInformation="*:443:" sslFlags="0" />
                    <binding protocol="http" bindingInformation="127.0.0.1:80:" />
                    <binding protocol="https" bindingInformation="127.0.0.1:443:" sslFlags="0" />
                </bindings>
            </site>


File content changed to:

<site name="Default Web Site" id="1">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
                </application>
                <application path="/PowerShell" applicationPool="MSExchangePowerShellFrontEndAppPool">
                    <virtualDirectory path="/" physicalPath="C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:80:" />
                    <binding protocol="net.tcp" bindingInformation="808:*" />
                    <binding protocol="net.pipe" bindingInformation="*" />
                    <binding protocol="net.msmq" bindingInformation="localhost" />
                    <binding protocol="msmq.formatname" bindingInformation="localhost" />
                    <binding protocol="https" bindingInformation="*:443:" sslFlags="0" />
                    <binding protocol="http" bindingInformation="127.0.0.1:80:" />
                    <binding protocol="https" bindingInformation="127.0.0.1:443:" sslFlags="0" />
                </bindings>
            </site>


I would take a backup of the file before you edit it, but it was straight forward and pretty simple to do once I figured the issue out.

Hope this helps.
  • Proposed as answer by Slick869 20 hours 20 minutes ago
February 27th, 2015 10:09am

Were you able to fix this?  I just ran across this problem and was pulling my hair out for three days before I figured it out.

My Default Web Site was removed and I had to put it back in IIS.  When it was put back in, the Site ID was set to "2" instead of "1".  I edited my applicationHost.config file so that the Default Web Site was set to ID "1", bounced IIS and that fixed my issue.

File location:  C:\Windows\System32\inetsrv\config\applicationHost.config

File content was:



<site name="Default Web Site" id="2">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
                </application>
                <application path="/PowerShell" applicationPool="MSExchangePowerShellFrontEndAppPool">
                    <virtualDirectory path="/" physicalPath="C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:80:" />
                    <binding protocol="net.tcp" bindingInformation="808:*" />
                    <binding protocol="net.pipe" bindingInformation="*" />
                    <binding protocol="net.msmq" bindingInformation="localhost" />
                    <binding protocol="msmq.formatname" bindingInformation="localhost" />
                    <binding protocol="https" bindingInformation="*:443:" sslFlags="0" />
                    <binding protocol="http" bindingInformation="127.0.0.1:80:" />
                    <binding protocol="https" bindingInformation="127.0.0.1:443:" sslFlags="0" />
                </bindings>
            </site>


File content changed to:

<site name="Default Web Site" id="1">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
                </application>
                <application path="/PowerShell" applicationPool="MSExchangePowerShellFrontEndAppPool">
                    <virtualDirectory path="/" physicalPath="C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\PowerShell" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:80:" />
                    <binding protocol="net.tcp" bindingInformation="808:*" />
                    <binding protocol="net.pipe" bindingInformation="*" />
                    <binding protocol="net.msmq" bindingInformation="localhost" />
                    <binding protocol="msmq.formatname" bindingInformation="localhost" />
                    <binding protocol="https" bindingInformation="*:443:" sslFlags="0" />
                    <binding protocol="http" bindingInformation="127.0.0.1:80:" />
                    <binding protocol="https" bindingInformation="127.0.0.1:443:" sslFlags="0" />
                </bindings>
            </site>


I would take a backup of the file before you edit it, but it was straight forward and pretty simple to do once I figured the issue out.

Hope this helps.
  • Proposed as answer by Slick869 Friday, February 27, 2015 3:10 PM
Free Windows Admin Tool Kit Click here and download it now
February 27th, 2015 3:10pm

You are 100% correct Slick869, but I want to bring you up to 110% by adding on a little bit of extra info. Not only does it have to have the ID of 1, but also has to be called "Default Web Site" (and I've installed from CU7 setup file)

It seems some of the virtual directories install into whatever site is Id #1, and some of install into whatever site is called "Default Web Site".

Quite honestly, I think the installer should create it's own Website much like it does for the "Exchange Back End" site that it creates.

April 14th, 2015 11:13pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics