Share via


Exchange 2007 Provider::DeleteFolder

This method deletes an existing public folder.

Arguments

Input Arguments Required Description

<path>

Yes

Specifies the location of the folder in the folder hierarchy, for example, \ for root level folders.

<preferredDomainController>

Yes

The domain controller to use for Active Directory actions.

<name>

Yes

The name of the Public Folder.

<server>

No

This parameter specifies the server on which the public folder resides. If a server is not specified, the command checks if the local server is a Microsoft Exchange Server 2007 mailbox server with a public folder store. If it is, the public folder is created locally. If it is not, Exchange finds the closest (by site cost) Exchange 2007 mailbox server with a public folder store on which to create the public folder.

<recurse>

No

This parameter specifies that all subfolders of the specified folder should be removed. If the Recurse parameter is not specified and the public folder has subfolders, the command does not run and returns an error message.

Remarks

Rollback Method: Not implemented

Security

The caller must be at least a member of role: UserCreators.

Sample Code

Example XML Request

<request> 
  <data> 
    <!--The domain controller to use for Active Directory actions.--> 
    <preferredDomainController>AD01.Fabrikam.Com</preferredDomainController> 
    <!--Specifies the name of the public folder.--> 
    <name>Legal</name> 
    <!--Specifies the location of the folder in the folder hierarchy, for example, \ for root level folders.--> 
    <path>\AlpineSkiHouse</path> 
    <!--Specifies the server on which the public folder resides.--> 
    <server>EXMBXOAB01</server> 
    <!--Specifies that all subfolders of the specified folder should be removed. If the Recurse parameter is not specified and the public folder has subfolders, the command does not run and returns an error message.--> 
    <recurse>true</recurse> 
  </data> 
  <procedure> 
    <execute namespace="Exchange 2007 Provider" procedure="DeleteFolder" impersonate="1"> 
      <before source="data" sourcePath="preferredDomainController" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="name" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="path" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="server" destination="executeData" mode="move" /> 
      <before source="data" sourcePath="recurse" destination="executeData" mode="move" /> 
      <after source="executeData" destination="data" mode="merge" /> 
    </execute> 
  </procedure> 
</request> 

Applies To

Exchange 2007 Provider Namespace for:

  • Hosted Messaging and Collaboration version 4.5

  • Hosted Messaging and Collaboration version 4.0

See also

Tasks

Hosted Email 2007::AddFolderPermission
Hosted Email 2007::CreateFolder
Hosted Email 2007::MailEnableFolder
Hosted Email 2007::MailDisableFolder
Hosted Email 2007::ModifyFolder
Hosted Email 2007::RemoveFolderPermission