Exchange – Delete and Recreate the PowerShell Virtual Directory

KB ID 0000700 Dtd 02/05/13


One of the big drawbacks of Exchange management being built on PowerShell, and it talking to the PowerShell virtual director is, when IIS has a problem, you can’t manage your Exchange via the command shell, or the Exchange Management Console.

While trying to fix a problem last week I wanted to remove and recreate the PowerShell virtual directory, and I found the PowerShell command, but no working examples for the correct syntax.


1. Remember your Exchange Management Shell won’t work, so load the Windows Powershell Modules shell. (Note: You will find this one under Administrative tools, NOT the one on the taskbar).

2. To remove the PowerShell virtual directory from the default web site;

Remove-PowerShellVirtualDirectory “Powershell (Default Web Site)”

3. Confirm by pressing A {enter}.

4. To recreate the PowerShell virtual directory;

New-PowerShellVirtualDirectory -Name Powershell -RequireSSL:$False

Remove Powershell Command

5. You can restart the web services with the following command;

iisreset /noforce


Related Articles, References, Credits, or External Links

Original article written 22/12/12

Author: Migrated

Share This Post On