We help IT Professionals succeed at work.

Exchange 2007 Powershell error

someITGuy
someITGuy used Ask the Experts™
on
We are trying to remove a public folder from a Exchange 2007 development environment so we can decommission the existing LUNS & get newer bigger LUNs

When we run this command:

Get-PublicFolder -Server <server containing the public folder database> "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue

We get this error:

Remove-PublicFolder : Cannot delete the object '\NON_IPM_SUBTREE\SCHEDULE+ FREE
 BUSY\EX:/o=CHHC/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)'. Please ma
ke sure that you specified the correct identity and that you have the correct p
ermissions to delete it.
At line:1 char:103
+ Get-PublicFolder -Server exbe1 "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimi
ted | Remove-PublicFolder <<<<  -Server exbe1 -Recurse
    + CategoryInfo          : NotSpecified: (6:Int32) [Remove-PublicFolder], M
   apiPartialCompletionException
    + FullyQualifiedErrorId : 2AD40FD,Microsoft.Exchange.Management.MapiTasks.
   RemovePublicFolder
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Open Exchange 2007 management shell (CMD line) and type following commands:

Get-PublicFolder -server xxxxx "\" -Recurse -ResultSize:Unlimited | Remove-PublicFolder -server xxxxx
-Recurse -ErrorActionilentlyContinue

Get-PublicFolder -Server xxxxx "\Non_Ipm_Subtree" -Recurse -ResultSize:Unlimited | Remove-PublicFolder
-Server xxxxx -Recurse -ErrorActionilentlyContinue

 

Replace xxxxx with your Exchange server name in the above command.

 

in ADSIEdit, go to Configuration, Configuration, Services, Microsoft Exchange, First

Organization, Administrative Groups, Exchange Administrative Group, Servers, Servername, Information Store, First Storage

Group.  Then on the right hand pane, highlight the Public Folder Store and Delete it.  This performs basically the

same function as the cmdlet does, or removing it via the Exchange Management Console
Top Expert 2010

Commented:

Author

Commented:
Had to go the ADSIEdit route...