KB ID 0000700
Problem
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.
Solution
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;
[box]
Remove-PowerShellVirtualDirectory “Powershell (Default Web Site)”
[/box]
3. Confirm by pressing A {enter}.
4. To recreate the PowerShell virtual directory;
[box]New-PowerShellVirtualDirectory -Name Powershell -RequireSSL:$False [/box]
5. You can restart the web services with the following command;
[box]
iisreset /noforce
[/box]
Related Articles, References, Credits, or External Links
Original article written 22/12/12