Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7)

Trying to update a new CU6 installation to CU7 and I can't get past this error.  Please help.

Exchange Server component Mailbox role: Transport service failed.

Error: Error:

The following error was generated when "$error.Clear();

          $feVdirName = "PowerShell (Default Web Site)";

          $beVdirName = "PowerShell (Exchange Back End)";

          $vdirName = "PowerShell";

          $InternalPowerShellUrl="http://" + $RoleFqdnOrName + "/powershell";

          get-PowerShellVirtualDirectory -ShowMailboxVirtualDirectories -server $RoleFqdnOrName -DomainController $RoleDomainController | where { $_.Name -eq $beVdirName -or $_.Name -eq $feVdirName } | remove-PowerShellVirtualDirectory -DomainController $RoleDomainController;

          new-PowerShellVirtualDirectory $vdirName -Role Mailbox -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$true -RequireSSL:$true -WebSiteName "Exchange Back End" -Path ($RoleInstallPath + "ClientAccess\PowerShell-Proxy");

          new-PowerShellVirtualDirectory $vdirName -Role Mailbox -InternalUrl $InternalPowerShellUrl -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$false -RequireSSL:$false -WebSiteName "Default Web Site" -AppPoolId "MSExchangePowerShellFrontEndAppPool";

        " was run: "System.ArgumentException: The virtual directory 'PowerShell' already exists under 'NSCCEx13.administration.nashvilletech.int/Exchange Back End'.

Parameter name: VirtualDirectoryName

   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.SystemConfigurationTasks.NewExchangeVirtualDirectory`1.InternalValidate()

   at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__b()

   at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".

Error:

The following error was generated when "$error.Clear();

          $feVdirName = "PowerShell (Default Web Site)";

          $beVdirName = "PowerShell (Exchange Back End)";

          $vdirName = "PowerShell";

          $InternalPowerShellUrl="http://" + $RoleFqdnOrName + "/powershell";

          get-PowerShellVirtualDirectory -ShowMailboxVirtualDirectories -server $RoleFqdnOrName -DomainController $RoleDomainController | where { $_.Name -eq $beVdirName -or $_.Name -eq $feVdirName } | remove-PowerShellVirtualDirectory -DomainController $RoleDomainController;

          new-PowerShellVirtualDirectory $vdirName -Role Mailbox -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$true -RequireSSL:$true -WebSiteName "Exchange Back End" -Path ($RoleInstallPath + "ClientAccess\PowerShell-Proxy");

          new-PowerShellVirtualDirectory $vdirName -Role Mailbox -InternalUrl $InternalPowerShellUrl -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$false -RequireSSL:$false -WebSiteName "Default Web Site" -AppPoolId "MSExchangePowerShellFrontEndAppPool";

        " was run: "System.ArgumentException: The virtual directory 'PowerShell' already exists under 'NSCCEx13.administration.nashvilletech.int/Default Web Site'.

Parameter name: VirtualDirectoryName

   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.SystemConfigurationTasks.NewExchangeVirtualDirectory`1.InternalValidate()

   at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__b()

   at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".
February 7th, 2015 12:00am

Some progress....followed instructions to remove Powershell with ADSIEdit.... now I get this error.

Exchange Server component Mailbox role: Transport service failed.

Error: Error:

The following error was generated when "$error.Clear();

          $feVdirName = "PowerShell (Default Web Site)";

          $beVdirName = "PowerShell (Exchange Back End)";

          $vdirName = "PowerShell";

          $InternalPowerShellUrl="http://" + $RoleFqdnOrName + "/powershell";

          get-PowerShellVirtualDirectory -ShowMailboxVirtualDirectories -server $RoleFqdnOrName -DomainController $RoleDomainController | where { $_.Name -eq $beVdirName -or $_.Name -eq $feVdirName } | remove-PowerShellVirtualDirectory -DomainController $RoleDomainController;

          new-PowerShellVirtualDirectory $vdirName -Role Mailbox -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$true -RequireSSL:$true -WebSiteName "Exchange Back End" -Path ($RoleInstallPath + "ClientAccess\PowerShell-Proxy");

          new-PowerShellVirtualDirectory $vdirName -Role Mailbox -InternalUrl $InternalPowerShellUrl -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$false -RequireSSL:$false -WebSiteName "Default Web Site" -AppPoolId "MSExchangePowerShellFrontEndAppPool";

        " was run: "System.InvalidOperationException: An error occurred while creating the IIS virtual directory 'IIS://NSCCEx13.administration.nashvilletech.int/W3SVC/2/ROOT/PowerShell' on 'NSCCEX13'. ---> System.Runtime.InteropServices.COMException: Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7)

   at System.DirectoryServices.Interop.UnsafeNativeMethods.IAdsContainer.Create(String className, String relativeName)

   at System.DirectoryServices.DirectoryEntries.Add(String name, String schemaClassName)

   at Microsoft.Exchange.Management.Metabase.IisUtility.CreateWebDirObject(String parent, String path, String vdirName)

   at Microsoft.Exchange.Management.Metabase.CreateVirtualDirectory.Execute()

   at Microsoft.Exchange.Management.SystemConfigurationTasks.NewExchangeVirtualDirectory`1.CreateToMetabase()

   at Microsoft.Exchange.Management.SystemConfigurationTasks.NewExchangeVirtualDirectory`1.InternalProcessRecord()

   --- End of inner exception stack trace ---

   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.SystemConfigurationTasks.NewExchangeVirtualDirectory`1.InternalProcessRecord()

   at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__b()

   at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".

Free Windows Admin Tool Kit Click here and download it now
February 7th, 2015 12:40am

Still at this error while installing CU7 on 2013 in coexistence with 2007.

Any help, please?

Error:

The following error was generated when "$error.Clear();

          $feVdirName = "PowerShell (Default Web Site)";

$beVdirName = "PowerShell (Exchange Back End)";

          $vdirName = "PowerShell";

          $InternalPowerShellUrl="http://" + $RoleFqdnOrName + "/powershell";

          get-PowerShellVirtualDirectory -ShowMailboxVirtualDirectories -server $RoleFqdnOrName -DomainController $RoleDomainController | where { $_.Name -eq $beVdirName -or $_.Name -eq $feVdirName } | remove-PowerShellVirtualDirectory -DomainController $RoleDomainController;

          new-PowerShellVirtualDirectory $vdirName -Role Mailbox -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$true -RequireSSL:$true -WebSiteName "Exchange Back End" -Path ($RoleInstallPath + "ClientAccess\PowerShell-Proxy");

          new-PowerShellVirtualDirectory $vdirName -Role Mailbox -InternalUrl $InternalPowerShellUrl -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$false -RequireSSL:$false -WebSiteName "Default Web Site" -AppPoolId "MSExchangePowerShellFrontEndAppPool";

        " was run: "System.ArgumentException: The virtual directory 'PowerShell' already exists under 'NSCCEx13.administration.nashvilletech.int/Exchange Back End'.

Parameter name: VirtualDirectoryName

   at Microsoft.Exchange.Configuration.Tasks.Task.ThrowError(Exception exception, ErrorCategory errorCategory, Object target, String helpUrl)

   at Microsoft.Exchange.Configuration.Tasks.Task.WriteError(Exception exception, ErrorCategory category, Object target)

   at Microsoft.Exchange.Management.SystemConfigurationTasks.NewExchangeVirtualDirectory`1.InternalValidate()

   at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__b()

   at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".

February 8th, 2015 3:55am

Tried this multiple times
http://ucbeacon.blogspot.com/2014/04/exchange-2013-setup-error-virtual.html

Free Windows Admin Tool Kit Click here and download it now
February 8th, 2015 12:35pm

Hi David,

I noticed that the error is related to an existing virtual directory 'PowerShell' in IIS. Please open IIS manager, delete PowerShell under the "Default Web Site" and then delete 'PowerShell' under the "Exchange Back End".

In ADSIEdit.msc, please navigate to the following path:

CN=Configuration,DC=domain,DC=com > CN=Services > CN=Microsoft Exchange > CN=Domain > CN=Administrative Groups > CN=Exchange Administrative Group > CN=Servers > CN=YOURSERVER > CN=Protocols > CN=HTTP.

Please delete CN=PowerShell (Exchange Back End) entry and CN=PowerShell (Default Web Site) entry. Then restart IIS service by running IISReset from a Command Prompt window. Check whether the issue persists.

Additionally, here is a similar thread for you:

https://social.technet.microsoft.com/Forums/office/en-US/32e06b5b-76bb-45d0-bf99-0b83c3182199/exchange-2013-cu2-upgrade-to-cu3-failed-at-front-end-transport-service?forum=exchangesvrdeploy

Regards,

February 12th, 2015 2:35am

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

Other recent topics Other recent topics