Επεξεργασία

Κοινή χρήση μέσω


Set-PublicFolder

This cmdlet is available in on-premises Exchange and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.

Use the Set-PublicFolder cmdlet to set the attributes of public folders.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Syntax

Set-PublicFolder
   [-Identity] <PublicFolderIdParameter>
   [-AgeLimit <EnhancedTimeSpan>]
   [-Confirm]
   [-DomainController <Fqdn>]
   [-EformsLocaleId <CultureInfo>]
   [-Force]
   [-HiddenFromAddressListsEnabled <Boolean>]
   [-IssueWarningQuota <Unlimited>]
   [-LocalReplicaAgeLimit <EnhancedTimeSpan>]
   [-MailRecipientGuid <Guid>]
   [-MailEnabled <Boolean>]
   [-MaxItemSize <Unlimited>]
   [-Name <String>]
   [-OverrideContentMailbox <MailboxIdParameter>]
   [-Path <PublicFolderIdParameter>]
   [-PerUserReadStateEnabled <Boolean>]
   [-ProhibitPostQuota <Unlimited>]
   [-Replicas <DatabaseIdParameter[]>]
   [-ReplicationSchedule <Schedule>]
   [-RetainDeletedItemsFor <EnhancedTimeSpan>]
   [-Server <ServerIdParameter>]
   [-UseDatabaseAgeDefaults <Boolean>]
   [-UseDatabaseQuotaDefaults <Boolean>]
   [-UseDatabaseReplicationSchedule <Boolean>]
   [-UseDatabaseRetentionDefaults <Boolean>]
   [-WhatIf]
   [<CommonParameters>]

Description

You need to be assigned permissions before you can run this cmdlet. Although this topic lists all parameters for the cmdlet, you may not have access to some parameters if they're not included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.

Examples

Example 1

Set-PublicFolder "\Customer Service Requests" -UseDatabaseReplicationSchedule $false

In Exchange 2010, this example changes a public folder so that it doesn't use the database default replication schedule.

Example 2

Set-PublicFolder "\Customer Service Requests" -OverrideContentMailbox North_America

This example changes the content location of the public folder hierarchy mailbox to North_America.

Example 3

Set-PublicFolder \MyPublicFolder -ReplicationSchedule "Saturday.12:00 AM-Monday.12:00 AM"

In Exchange 2010, this example sets the folder to replicate only on weekends.

Parameters

-AgeLimit

The AgeLimit parameter specifies the overall age limit on the folder. Replicas of this public folder are automatically deleted when the age limit is exceeded.

To specify a value, enter it as a time span: dd.hh:mm:ss where dd = days, hh = hours, mm = minutes, and ss = seconds.

Type:EnhancedTimeSpan
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-Confirm

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.
  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.
Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-DomainController

This parameter is available only in on-premises Exchange.

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 (FQDN). For example, dc01.contoso.com.

Type:Fqdn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019

-EformsLocaleId

The EformsLocaleId parameter specifies the locale-specific version of the e-forms library. The valid input for the EformsLocaleId parameter is the string names listed in the Culture Name column in the Microsoft .NET Class Library class reference available at CultureInfo Class.

Type:CultureInfo
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-Force

The Force switch hides warning or confirmation messages. You don't need to specify a value with this switch.

You can use this switch to run tasks programmatically where prompting for administrative input is inappropriate.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-HiddenFromAddressListsEnabled

This parameter is available only in Exchange Server 2010.

The HiddenFromAddressListsEnabled parameter specifies whether to hide the public folder from address lists.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

-Identity

The Identity parameter specifies the name and path of the public folder you want to modify. A valid value uses the format: \Level1\Level2\...\LevenN\PublicFolder. For example, "\Customer Discussion" or "\Engineering\Customer Discussion".

Type:PublicFolderIdParameter
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-IssueWarningQuota

The IssueWarningQuota parameter specifies the public folder size that triggers a warning to public folder owners stating that the folder is almost full.

The default value is unlimited, which is 2 terabytes.

When you enter a value, qualify the value with one of the following units:

  • B (bytes)
  • KB (kilobytes)
  • MB (megabytes)
  • GB (gigabytes)
  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values may be rounded up to the nearest kilobyte.

The valid input range for this parameter is from 1 through 2TB.

Type:Unlimited
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-LocalReplicaAgeLimit

This parameter is available only in Exchange Server 2010

The LocalReplicaAgeLimit parameter specifies the age limit of the replica on the connected server, if there is a replica on it.

Type:EnhancedTimeSpan
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

-MailEnabled

The MailEnabled parameter specifies that the public folder is mail-enabled. To do this, you use the value $true.

You use this parameter to correct a mail-enabled public folder that lost its mail-enabled status. If you attempt to use this parameter to mail-enable a public folder that was never mail-enabled, the command will fail.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-MailRecipientGuid

The MailRecipientGuid parameter specifies the MailRecipientGuid value of the public folder. You use this parameter to correct a mail-enabled public folder that lost its MailRecipientGuid value.

The value that you specify for this parameter must match the MailRecipientGuid value of an existing mail-enabled public folder. Otherwise, the command will fail.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-MaxItemSize

The MaxItemSize parameter specifies the maximum size for posted items. Items larger than the value of the MaxItemSize parameter are rejected. The default value is unlimited, which is 2 gigabytes. When you enter a value, qualify the value with one of the following units:

When you enter a value, qualify the value with one of the following units:

  • B (bytes)
  • KB (kilobytes)
  • MB (megabytes)
  • GB (gigabytes)
  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values may be rounded up to the nearest kilobyte.

The valid input range for this parameter is from 1 through 2GB.

Type:Unlimited
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-Name

The Name parameter specifies the name for the public folder.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-OverrideContentMailbox

This parameter is available only in on-premises Exchange.

The OverrideContentMailbox parameter specifies the target public folder mailbox whereyou want to move this public folder's content to. You can use any value that uniquely identifies the mailbox. For example:

  • Name
  • Alias
  • Distinguished name (DN)
  • Canonical DN
  • Domain\Username
  • Email address
  • GUID
  • LegacyExchangeDN
  • SamAccountName
  • User ID or user principal name (UPN)
Type:MailboxIdParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019

-Path

The Path parameter specifies the path of the public folder, for example, \TopLevelPublicFolder\PublicFolder.

Type:PublicFolderIdParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-PerUserReadStateEnabled

The PerUserReadStateEnabled parameter specifies whether to maintain read and unread data on a per-user basis.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-ProhibitPostQuota

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 whose size is larger than the ProhibitPostQuota parameter value. The default value is unlimited, which is 2 terabytes.

When you enter a value, qualify the value with one of the following units:

  • B (bytes)
  • KB (kilobytes)
  • MB (megabytes)
  • GB (gigabytes)
  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values may be rounded up to the nearest kilobyte.

The valid input range for this parameter is from 1 through 2TB.

Type:Unlimited
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-Replicas

This parameter is available only in Exchange Server 2010

The Replicas parameter specifies a list of public folder databases with which to replicate this public folder. You can use any value that uniquely identifies the database. For example:

  • Name
  • Distinguished name (DN)
  • GUID

You can specify multiple values separated by commas. If the values contain spaces, use the following syntax: "Value1","Value2",..."ValueN".

Type:DatabaseIdParameter[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

-ReplicationSchedule

This parameter is available only in Exchange Server 2010

The ReplicationSchedule parameter specifies the replication schedule for the folder.

The syntax for this parameter is: StartDay.Hour:Minute [AM | PM]-EndDay.Hour:Minute [AM | PM].

You can use the following values for days:

  • Full name of the day.
  • Abbreviated name of the day.
  • Integer from 0 through 6, where 0 = Sunday.

You can enter the time in 24 hour format and omit the AM/PM value. If you enter the time in 12 time hour format, include a space between the time and the AM/PM value.

You can mix and match date/time formats.

The start time and end time must be at least 15 minutes apart. Minutes are rounded down to 0, 15, 30, or 45.

Here are some examples:

  • "Sun.11:30 PM-Mon.1:30 AM"
  • "6.22:00-6.22:15" (Run from Saturday at 10:00 PM until Saturday at 10:15 PM.)
  • "Sun.1:15 AM-Monday.23:00"
Type:Schedule
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

-RetainDeletedItemsFor

The RetainDeletedItemsFor parameter specifies the retention time for deleted items.

To specify a value, enter it as a time span: dd.hh:mm:ss where dd = days, hh = hours, mm = minutes, and ss = seconds.

Type:EnhancedTimeSpan
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

-Server

This parameter is available only in Exchange Server 2010

The Server parameter specifies the Exchange server where you want to run this command. You can use any value that uniquely identifies the server. For example:

  • Name
  • FQDN
  • Distinguished name (DN)
  • Exchange Legacy DN

If you don't use this parameter, the command is run on the local server.

Type:ServerIdParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

-UseDatabaseAgeDefaults

This parameter is available only in Exchange Server 2010

The UseDatabaseAgeDefaults parameter specifies whether to use the database age limit.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

-UseDatabaseQuotaDefaults

This parameter is available only in Exchange Server 2010

The UseDatabaseQuotaDefaults parameter specifies whether to use the public store quota limits.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

-UseDatabaseReplicationSchedule

This parameter is available only in Exchange Server 2010

The UseDatabaseReplicationSchedule parameter specifies whether to use the public folder replication schedule.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

-UseDatabaseRetentionDefaults

This parameter is available only in Exchange Server 2010

The UseDatabaseRetentionDefaults parameter specifies whether to use the database retention defaults.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010

-WhatIf

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online

Inputs

Input types

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn't accept input data.

Outputs

Output types

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn't return data.