Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1743
  • Last Modified:

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?
0
Ben Hart
Asked:
Ben Hart
  • 3
  • 2
1 Solution
 
Ben HartAuthor Commented:
I typo'd the syntax in the title line.  My bad.
0
 
e_aravindCommented:
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


0
 
Ben HartAuthor Commented:
I assumed all the required snapins would be loaded automatically using the "Windows Powershell Modules"...?
0
 
e_aravindCommented:
IMO, Nope

By default the normal access wont have the exchange commands
While the power-shell with "Import system modules" would allow you to execute exchange commands.
0
 
Ben HartAuthor Commented:
Thanks! worked great
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now