Link to home
Start Free TrialLog in
Avatar of Ben Hart
Ben HartFlag for United States of America

asked on

remove-powershellvirtudirectory not working

IN an attempt to troubleshoot a different issue with my Exchange 2010 setup I'm trying to remove the powershell VD... which is failing.

I run "get-powershellvirtualdirectory" and the results list three different VD's, two of which it says "WARNING: IIS://servername/W3SVC/1/ROOT/vdname wasn't found"  Now those two entried it gives that warning for are the names of VD's that I manually created earlier.  I deleted them by "Removin" in the IIS Manager. (I think now that was the wrong way)

Anyway since those two false entries are listed, that means their in a file somewhere right?  It would be better if they weren't correct?  How would I remove references to them?

Secondly, When I run "remove-powershellvirtualdirectory -identity "new powershell" (which is the name of the current powershell VD) I get another error "Operation cannot be performed because object blah couldn't be found on 'servername'"

So how can I successfully remove these?
Avatar of Ben Hart
Ben Hart
Flag of United States of America image

ASKER

I typo'd the syntax in the title line.  My bad.
To delete\recreate the PowerShell Virtual Directory
a.Open Windows PowerShell Using Administrative Credentials
b.Load Exchange 2010 Snapin using the following command
c.Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010


I assumed all the required snapins would be loaded automatically using the "Windows Powershell Modules"...?
ASKER CERTIFIED SOLUTION
Avatar of e_aravind
e_aravind
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks! worked great