Applies to: Exchange Server 2007
Topic Last Modified: 2007-06-06

Use the New-PublicFolderDatabase cmdlet to create public folder databases in the specified storage group.

Syntax

New-PublicFolderDatabase -Name <String> -StorageGroup <StorageGroupIdParameter> [-CopyEdbFilePath <EdbFilePath>] [-DomainController <Fqdn>] [-EdbFilePath <EdbFilePath>] [-HasLocalCopy <$true | $false>] [-TemplateInstance <PSObject>]

Parameters

Parameter Required Type Description

Name

Required

System.String

The Name parameter specifies the name of the new public folder database.

StorageGroup

Required

Microsoft.Exchange.Configuration.Tasks.StorageGroupIdParameter

The StorageGroup parameter specifies the storage group that will contain the new public folder database. Valid values are

  • Name

  • GUID

StorageGroup is the only New-PublicFolderDatabase parameter that can be piped.

CopyEdbFilePath

Optional

Microsoft.Exchange.Data.EdbFilePath

The CopyEdbFilePath parameter specifies the full path of the copy of the Exchange database (.edb) files. The name of the file specified by this parameter must be identical to the file specified by the EdbFilePath parameter. If this parameter is specified, the HasLocalCopy parameter must be set to $true.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to the Active Directory directory service, include the DomainController parameter in the command.

EdbFilePath

Optional

Microsoft.Exchange.Data.EdbFilePath

The EdbFilePath parameter specifies the full path of the public folder database files.

HasLocalCopy

Optional

System.Boolean

If the value of the HasLocalCopy parameter is $true, a copy of the Exchange database (.edb) file will also be created at the location that is specified in the CopyEdbFolderPath parameter.

This parameter must be set to $true if the CopyEdbFolderPath parameter is specified.

TemplateInstance

Optional

System.Management.Automation.PSObject

The TemplateInstance parameter is added automatically to commands that support it. This parameter is used to clone the configuration of one object to another object. This parameter is most useful when you want to clone the exact configuration of a complex object or when you want to apply the same configuration to multiple objects.

Detailed Description

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

  • Exchange Server 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.

Note:
The new database must be mounted after it is created. For more information about mounting databases, see How to Mount a Database.
Note:
A server can have only one public folder database.

Input Types

Return Types

Errors

Error Description

 

Exceptions

Exceptions Description

 

Example

In this example, the New-PublicFolderDatabase command is used to create a new public folder database named My Public Folder Database in the storage group named Second Storage Group.

Use the Mount-Database command after the New-PublicFolderDatabase command to mount the new database.

Copy Code
New-PublicFolderDatabase -Name "My Public Folder Database" -StorageGroup "Second Storage Group" -HasLocalCopy $true -EdbFilePath "C:\Program Files\Microsoft\ExchangeServer\Mailbox\Second Storage Group\My Public Folder Database.edb" -CopyEdbFilePath "E:\Program Files\Microsoft\ExchangeServer\Mailbox\Second Storage Group\Copy\My Public Folder Database.edb"

Only the StorageGroup parameter can be piped.