Tuesday , November 21 2017

How to Re-Create Powershell Virtual Directory in a Single Exchange Server Environment

Lets see how to recreate a Powershell Virtual Directory in a Single Exchange Server Environment.

Note : Do not do this if you have multiple Exchange Servers in the Environment. As you might end up with an Error – Powershell already Exists

At times we had to recreate this Power shell virtual Directory when it goes corrupted or when wrong customizations done and you might end up in a Exchange  Management Console issue. So recreating will be the last option.

Before Proceeding – Make sure you are able to run “New-PowershellVirtualDirectory” Cmdlet – Type “New-Po” and Then press your TAB key it should resolve your command

Step 1:

Run

Get-PowerShellVirtualDirectory

make sure it Returns the Existing PowerShellVirtualDirectory

image

Run

Get-PowerShellVirtualDirectory | Fl Server,Id*

Get the identity

image

Step 2:

Run

Remove-PowerShellVirtualDirectory "Exchange2010\PowerShell (Default Web Site)"

Press Yes

Step 3:

Run

New-PowerShellVirtualDirectory -Name Powershell -RequireSSL:$False

Then,Run iisReset in Cmd prompt to refresh things

Browsing the PowershellWebsite should give you 401.0 Access Denied –(Default)

Powershell Default Page

image

About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Exchange Server MVP , Publisher of CareExchange.in Supporting/Deploying/Designing Microsoft Exchange for some years. Extensive experience on Microsoft Technologies.

Check Also

The Maximum Size of an object has been exceeded

Active Directory Servers – Error Issuing Replication : 8304 (0x2070): The Maximum Size of an ...

9 comments

  1. I ran into an issue creating the virtual directory as described. I get an error stating the following:

    New-PowerShellVirtualDirectory : An error occurred while creating the IIS virtual directory ‘IIS://servername.domain.local/W3SVC/1/ROOT/PowerShell’ on ‘server’.

    New-PowerShellVirtualDirectory -Name PowerShell -RequireSSL:$False
    CategoryInfo : InvalidOperation: (server\P…fault Web Site):ADObjectId) [New-PowerShellVirtualDirectory],

    and so on.

    Any suggestions?

  2. Hi,
    I have problem to run “New-PowershellVirtualDirectory” Cmdlet
    there is no Cmdlet like that in my server.
    what can i do?

  3. Thanks so much!

    Great Job! Work fine

  4. i follow 1 to 3 steps. but now i m not able to create powershell in iis.

    Same error i m getting. Any suggestions?

    New-PowerShellVirtualDirectory : An error occurred while creating the IIS virtual directory ‘IIS://servername.domain.local/W3SVC/1/ROOT/PowerShell’ on ‘server’.

    New-PowerShellVirtualDirectory -Name PowerShell -RequireSSL:$False
    CategoryInfo : InvalidOperation: (server\P…fault Web Site):ADObjectId) [New-PowerShellVirtualDirectory],

Leave a Reply

Your email address will not be published.