Jul15

Exchange 2010 SP1 or SP2 trouble with: The virtual directory 'PowerShell' already exists

Author // Charles Arconi Categories // Exchange Server

Microsoft Exchange 2010 SP1 & SP2

Issue:

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

$vdirName = "PowerShell";

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

new-PowerShellVirtualDirectory $vdirName -InternalUrl $InternalPowerS

ellUrl -DomainController $RoleDomainController -BasicAuthentication:$false -Win

owsAuthentication:$false -RequireSSL:$false;

" was run: "The virtual directory 'PowerShell' already exists under 'US

LTEXMB01.epri.com/Default Web Site'.

Parameter name: VirtualDirectoryName".

 

This typically occurs after trying to fix an SP2 or SP1 install/update that went wrong.

  1. On the offending Exchange Server open ADSIEDT.
  2. Click on Action and select “connection”.
  3. Select “Configuration” from the drop down in the “Connection Settings” dialog.

Diagram 1

EX_2010_powershell 0

  1. Navigate to:
    1. CN=Configuration,DC=domain,DC=suffix
    2. CN=Services
    3. CN=Microsoft Exchange
    4. CN=[your domain]
    5. CN=Administrative Groups
    6. CN=Exchange Administrative Groups
    7. CN=Servers
    8. CN=[your server]
    9. CN=Protocols
    10. CN=HTTP
    11. Find the (in the right pane) CN=Powershell (Default Web Site), CN=HTTP… and delete it.

Diagram 2

EX_2010_powershell 1

 

 

  1. Open the registry editor and navigate to
    1. KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\MailboxRole
    2. Find the “Action” key and delete it.

Diagram 3

EX_2010_powershell 2


 

 

  1. Navigate to: (Shown in diagram 3)
    1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager
    2. Locate the “PendingFileRenameOperations” key and delete it.

Diagram 4

EX_2010_powershell 3

  1. Restart the setup fromnthe command line as shown in digram 4. NOTE: in my example I am using the:

Setup.com /mode:uninstall /roles:mailbox

  1. You may be using:

Setup.com /mode:install /roles:mailbox for an install or upgrade, in my case I was uninstalling the server.

Diagram 5

cmd_pwoershell

blog comments powered by Disqus

About the Author

Charles Arconi

Charles Arconi

Charles Arconi, Senior Consultant currently employed at Cornerstone Technologies, has over 18 years’ experience in the IT field. That experience comes from 11 years of IT administration and 7+ years of consulting. Charles has performed large 10,000+ seat implementations of Microsoft Exchange, Data Archiving (various vendors), Active Directory and many surrounding technologies. Likewise Charles has a firm grasp of the needs, both business and technical, associated with IT in small and large organizations