none
Exchange 2010 SP1 mailbox role install failure PowerShell virtual directory

    Question

  • The following error was generated when "$error.Clear();
              $vdirName = "PowerShell";
              $InternalPowerShellUrl="http://" + $RoleFqdnOrName + "/powershell";
              new-PowerShellVirtualDirectory $vdirName -InternalUrl $InternalPowerShellUrl -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$false -RequireSSL:$false;
            " was run: "The virtual directory 'PowerShell' already exists under servername.yourdomain/Default Web Site'.
    Parameter name: VirtualDirectoryName"

    This error is very frustrating and it is stopping me from installing SP1 to my mailbox servers.  Any help would be appreciated.

    Tuesday, September 07, 2010 2:36 PM

Answers

  • Hello Jeff

    Here is the resoltuion for the Power Shell Virtual Directory Issue:

    1. Open ADSIEDIT.msc and navigate to SERVER - PROTOCOLS – HTTP, then delete PowerShell VD.

    2. Log onto the server , launch IIS Manger and remove the PowerShell VD.

    3.Run this command from the Elevated cmd prompt -> cscript.exe Adsutil.vbs delete w3svc/1/root/PowerShell

    4. Restart Server

    After Following these steps Installation should move forward.

    Hope this Help

    Harpreet Singh (Harry)

    Friday, September 10, 2010 6:39 PM
  • Hello Harry,

    Yes that did the trick.  Thanks for your help!

    Jeff

    • Proposed as answer by Harpreet Singh - Harry Thursday, September 16, 2010 8:40 PM
    • Marked as answer by JeffL57 Thursday, September 23, 2010 3:13 AM
    Thursday, September 16, 2010 6:58 PM

All replies

  • Did you by any chance rename the default web site to something else in IIS?
    Microsoft Premier Field Engineer, Exchange
    MCSA 2000/2003, CCNA
    MCITP: Enterprise Messaging Administrator 2010
    Former Microsoft MVP, Exchange Server
    My posts are provided “AS IS” with no guarantees, no warranties, and they confer no rights.
    Tuesday, September 07, 2010 2:48 PM
  • Oh sorry, no the default web site was not renamed or changed in any way.
    Tuesday, September 07, 2010 2:55 PM
  • Hi JeffL57,

    Could you please launch IIS manager and delete the Powershell Vdir and try again?


    Frank Wang
    Friday, September 10, 2010 2:41 AM
  • HI Frank,

    I did what you requested and deleted the virtual directory for powershell in IIS.  restarted IIS just to make sure the deletion of the Vdir was cpmplete and the Vdir was gone, which it was.  I then tried the setup for SP1 and failed again at the mailbox install module.  It again reports that the paowershell virtual directory exisits:

     The following error was generated when "$error.Clear();
              $vdirName = "PowerShell";
              $InternalPowerShellUrl="http://" + $RoleFqdnOrName + "/powershell";
              new-PowerShellVirtualDirectory $vdirName -InternalUrl $InternalPowerShellUrl -DomainController $RoleDomainController -BasicAuthentication:$false -WindowsAuthentication:$false -RequireSSL:$false;
            " was run: "The virtual directory 'PowerShell' already exists under servername.yourdomain/Default Web Site'.
    Parameter name: VirtualDirectoryName"

    I even checked the config file in c:\windows\system32\inetsrv\config\applicationhost.config file to make sure there were no entries for a powershell Vdir.

    I rebooted the server and ensured that in IIS there still did not exist a powershell vdir under default web site.  I then tried the setup for SP1 again and it failed again at the very same palce with the very same error.

    Am I missing something here as far as where this powershell Vdir could be located?

    Friday, September 10, 2010 3:09 PM
  • Hello Jeff

    Here is the resoltuion for the Power Shell Virtual Directory Issue:

    1. Open ADSIEDIT.msc and navigate to SERVER - PROTOCOLS – HTTP, then delete PowerShell VD.

    2. Log onto the server , launch IIS Manger and remove the PowerShell VD.

    3.Run this command from the Elevated cmd prompt -> cscript.exe Adsutil.vbs delete w3svc/1/root/PowerShell

    4. Restart Server

    After Following these steps Installation should move forward.

    Hope this Help

    Harpreet Singh (Harry)

    Friday, September 10, 2010 6:39 PM
  • Hello Harry,

    Yes that did the trick.  Thanks for your help!

    Jeff

    • Proposed as answer by Harpreet Singh - Harry Thursday, September 16, 2010 8:40 PM
    • Marked as answer by JeffL57 Thursday, September 23, 2010 3:13 AM
    Thursday, September 16, 2010 6:58 PM
  • Hi!  Harry

     

    Where can I find "SERVER" in ADSIEDIT.msc?  I looked under the Default Naming Context, Configuration, Schema, and RootDSE but cannot find it.

     

     

    YC

    Saturday, October 16, 2010 4:05 AM
  • I had the same problem.

    My default web site had the Name "Standardwebseite" which is the german word for it.

    I think it was a silly Bug betweet the Languageversions. :-(

     

     

    I renamed it to 'Default Web Site' and then i deleted with the powershell the owa directory, the ecp directory and the powershell directory.

    del-owavirtualdirectory

    del-ecpvirtualdirectory

    del-powershellvirtualdirectory

     

    After this i recreated this with following commands:

    new-owavirtualdirectory

    new-ecpvirtualdirectory

    new-powershellvirtualdirectory

    And as location for the directorys i took the new name 'Default Web Site'

    Rebooting the Server and SP1 installs without any error.

    Thursday, January 20, 2011 1:09 PM
  • Sepper17, i too am facing similar issue about it.  Default Web Site is as Default WebSite (no space) as a reason i got the sp1 failed. For me it detected the Powershell directory in Default WebSite but for CAS it cannot find Default Web Site.

    I tried renaming the Default WebSite but then all my folders are gone, there are so many exchange folder what will happen to them? and are those the only files u deleted. What about the autodiscover folder for instance?

     


    MVI - Most Valuable Indian
    Tuesday, May 03, 2011 9:58 AM
  • Hello Jeff

    Here is the resoltuion for the Power Shell Virtual Directory Issue:

    1. Open ADSIEDIT.msc and navigate to SERVER - PROTOCOLS – HTTP, then delete PowerShell VD.

    2. Log onto the server , launch IIS Manger and remove the PowerShell VD.

    3.Run this command from the Elevated cmd prompt -> cscript.exe Adsutil.vbs delete w3svc/1/root/PowerShell

    4. Restart Server

    After Following these steps Installation should move forward.

    Hope this Help

    Harpreet Singh (Harry)

    This didn't work for me see...
    http://azatechknow.blogspot.com/2012/02
    Tuesday, February 14, 2012 5:01 PM
  • Hello Harry,

                          i open adsiedit, but i cant find any way to navigate to server-protocol-http.

    The only option add appears in my case it shows me my DC Information, but nothing about Powershell.

    In IIS manager i found nothing like PowerShell VD.

    Wednesday, July 31, 2013 4:18 PM