Share via


New-PublicFolder

 

Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

Use the New-PublicFolder cmdlet to create a new public folder with the specified name.

Syntax

New-PublicFolder -Name <String> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-Path <PublicFolderIdParameter>] [-Server <ServerIdParameter>] [-WhatIf [<SwitchParameter>]]

Detailed Description

To run the New-PublicFolder cmdlet, the account you use must be delegated the following:

  • Exchange Public Folder Administrator role and local Administrators group for the target server

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.

Parameters

Parameter Required Type Description

Name

Required

System.String

The Name parameter specifies the name for the public folder.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm parameter.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the domain controller to use to write this configuration change to Active Directory. Use the fully qualified domain name (FQDN) of the domain controller that you want to use.

Path

Optional

Microsoft.Exchange.Configuration.Tasks.PublicFolderIdParameter

The Path parameter specifies the location of the folder in the folder hierarchy, for example, \Legal\Cases.

Server

Optional

Microsoft.Exchange.Configuration.Tasks.ServerIdParameter

The Server parameter specifies the server on which to create the public folder.

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.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf parameter.

Input Types

Return Types

Errors

Error Description

  

Exceptions

Exceptions Description

  

Example

The following code gives examples of how to use the New-PublicFolder command:

  • Example one creates a new public folder named MyPublicFolder in the root of the public folder tree on the local server of the next closest mailbox server with a public folder store.

  • Example two creates a new public folder named MyPublicFolder under the existing folders \Legal\Cases. The path to the new folder will be \Legal\Cases\MyPublicFolder on Server2.

New-PublicFolder -Name MyPublicFolder 
New-PublicFolder -Name MyPublicFolder -Path \Legal\Cases -Server Server2

The Server parameter supports the ability to accept a pipeline for its argument and strong type. This enables bulk management.