Question : Exchange 2007 Powershell error

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

Answer : Exchange 2007 Powershell error

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
Random Solutions  
 
programming4us programming4us