Commands › Exchange Online

Set-PublicFolderDatabase

Exchange Online ExchangeOnlineManagement Set-*

Set attributes of public folder databases.

Quick start script

# Set-PublicFolderDatabase — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-PublicFolderDatabase
$before | Format-List

# 3. Make the change (dry run first)
Set-PublicFolderDatabase -Identity <DatabaseIdParameter> -WhatIf
Set-PublicFolderDatabase -Identity <DatabaseIdParameter>

# 4. Verify and diff
$after = Get-PublicFolderDatabase
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-PublicFolderDatabase [-Identity] <DatabaseIdParameter>
 [-AllowFileRestore <Boolean>]
 [-BackgroundDatabaseMaintenance <Boolean>]
 [-CircularLoggingEnabled <Boolean>]
 [-Confirm]
 [-CustomReferralServerList <MultiValuedProperty>]
 [-DeletedItemRetention <EnhancedTimeSpan>]
 [-DomainController <Fqdn>]
 [-EventHistoryRetentionPeriod <EnhancedTimeSpan>]
 [-IssueWarningQuota <Unlimited>]
 [-ItemRetentionPeriod <Unlimited>]
 [-MaintenanceSchedule <Schedule>]
 [-MaxItemSize <Unlimited>]
 [-MountAtStartup <Boolean>]
 [-Name <String>]
 [-ProhibitPostQuota <Unlimited>]
 [-QuotaNotificationSchedule <Schedule>]
 [-ReplicationMessageSize <ByteQuantifiedSize>]
 [-ReplicationPeriod <UInt32>]
 [-ReplicationSchedule <Schedule>]
 [-RetainDeletedItemsUntilBackup <Boolean>]
 [-UseCustomReferralServerList <Boolean>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (23)

ParameterTypeRequiredWhat it controls
-Identity DatabaseIdParameter yes The Identity parameter specifies the public folder database that you want to modify. You can use any value that uniquely identifies the database. For example:
-AllowFileRestore Boolean The AllowFileRestore parameter specifies that the public folder database can be overwritten if the public folder database is restored. The default value is $false.
-BackgroundDatabaseMaintenance Boolean The BackgroundDatabaseMaintenance parameter specifies whether the Extensible Storage Engine (ESE) performs database maintenance. The two possible values are $true or $false. If you specify $true, the public folder...
-CircularLoggingEnabled Boolean The CircularLoggingEnabled parameter specifies whether to enable circular logging. If you specify a value of $true, circular logging is enabled. The default value is $false.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-CustomReferralServerList MultiValuedProperty The CustomReferralServerList parameter specifies public folder referral costs to individual servers manually. Costs can be any positive number. Servers not included on the list aren't included for referrals. If this...
-DeletedItemRetention EnhancedTimeSpan The DeletedItemRetention parameter specifies the time that deleted items are kept in the dumpster before being permanently deleted during store maintenance.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-EventHistoryRetentionPeriod EnhancedTimeSpan The EventHistoryRetentionPeriod parameter specifies the length of time that events are retained in the event history table. Events can be retained for up to one week.
-IssueWarningQuota Unlimited The IssueWarningQuota parameter specifies the public folder size at which a warning is issued to public folder owners stating that the folder is almost full.
-ItemRetentionPeriod Unlimited The ItemRetentionPeriod parameter specifies the length of time that items are retained in a folder before they're deleted during store maintenance.
-MaintenanceSchedule Schedule The MaintenanceSchedule parameter specifies the store maintenance schedule.
-MaxItemSize Unlimited The MaxItemSize parameter specifies the maximum size of an item that can be posted to or received by a public folder.
-MountAtStartup Boolean The MountAtStartup parameter specifies whether the database should be mounted when the store starts. The default value is $true.
-Name String The Name parameter specifies the name of the public folder database. Use this parameter to change the name of the public folder database.
-ProhibitPostQuota Unlimited The ProhibitPostQuota parameter specifies the size of a public folder at which users are notified that the public folder is full. Users can't post to a folder larger than the ProhibitPostQuota parameter value.
-QuotaNotificationSchedule Schedule The QuotaNotificationSchedule parameter specifies the interval at which warning messages are sent when public folders exceed their specified size limit.
-ReplicationMessageSize ByteQuantifiedSize The ReplicationMessageSize parameter specifies the size of replication messages. Small items might be aggregated into a single replication message that can be as large as this setting, but items larger than this...
-ReplicationPeriod UInt32 The ReplicationPeriod parameter specifies the interval at which replication of public folders or content updates might occur.
-ReplicationSchedule Schedule The ReplicationSchedule parameter specifies the time intervals during which replication of public folders or contents might occur.
-RetainDeletedItemsUntilBackup Boolean The RetainDeletedItemsUntilBackup parameter specifies that deleted items aren't removed until a backup of the public folder database is performed. The default value is $false.
-UseCustomReferralServerList Boolean The UseCustomReferralServerList parameter specifies whether to use the server costs specified by the PublicFolderReferralServerList parameter. If set to $true, the server uses the PublicFolderReferralServerList...
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.