Scripts for Managing Public Folders in the Exchange Management Shell
Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2
Running scripts in the Exchange Management Shell can make public folder administration faster and easier by automating complex or frequently performed tasks. You can use scripts that are installed with Microsoft Exchange Server 2010 and described in this topic (as well as other scripts), or you can write your own scripts.
Note
The Shell doesn't load scripts automatically. You must precede all scripts with .</STRONG> (a period, followed by a backslash). For example, to run the AggregatePFData.ps1 script, type .\AggregatePFData.ps1.
The collection of Shell scripts described in this topic is installed, by default, at <Exchange Installation Path>\v14\ Server\Scripts.
For more information about using and writing scripts, see Scripting with the Exchange Management Shell.
Looking for other management tasks related to public folders? Check out Managing Public Folders.
Administrative Scripts
The following table lists the administrative scripts included with Exchange 2010.
Task | Script | Description |
---|---|---|
Add a server to the replication list. |
AddReplicaToPFRecursive.ps1 |
This script adds a new server to the replication list for a public folder and all the folders beneath it in the hierarchy. If the server is already listed in the replication list for a folder, nothing is changed for that folder. This script accepts the following parameters:
|
Aggregate data across all public folder replicas. |
AggregatePFData.ps1 |
This script aggregates and captures information collected from the following cmdlets:
The following information is aggregated at the public folder level, and not at the item level:
This script accepts the following parameters:
For more information, see View Public Folder Item Statistics. |
Remove a server from the replication list. |
RemoveReplicaFromPFRecursive.ps1 |
This script removes a server from the replication list for a public folder and all the folders beneath it in the hierarchy. If the server isn't listed in the replication list for a folder, nothing is changed for that folder. If the server is the only server on the replication list, the list isn't changed. This script accepts the following parameters:
|
Replace a server in the replication list. |
MoveAllReplicas.ps1 |
This script replaces a server with a new server in the replication list for all public folders, including system folders. This script accepts the following parameters:
|
Replace a server in the replication list with a new server. |
ReplaceReplicaOnPFRecursive.ps1 |
This script replaces a server with a new server in the replication list for a public folder and all the folders beneath it in the hierarchy. If the server that you want to remove isn't listed in the replication list for a particular folder, nothing is changed for that folder. This script accepts the following parameters:
|
User Management Scripts
The following table lists the user management scripts included with Exchange 2010.
Task | Script | Description |
---|---|---|
Add a user to the client permissions list. |
AddUsersToPFRecursive.ps1 |
This script adds a user and that user's permissions to the client permissions list for a public folder and all the folders beneath it in the hierarchy. If the user is already listed in the client permissions list for a folder, the user's permissions are updated to the new set specified in the script. This script accepts the following parameters:
|
Replace a user with a new user in the client permissions list. |
ReplaceUserWithUserOnPFRecursive.ps1 |
This script replaces a user with a new user in the client permissions list for a public folder and all the folders beneath it in the hierarchy. Existing permissions for the first user are retained. Public folders that don't contain permissions for the user aren't modified. This script accepts the following parameters:
|
Replace a user's permissions. |
ReplaceUserPermissionOnPFRecursive.ps1 |
This script replaces the permissions of a user in the client permissions list for a public folder with a new set of permissions. It also replaces the permissions for all the folders in the hierarchy beneath that folder. Public folders that don't contain permissions for the user aren't modified. This script accepts the following parameters:
|
Remove a user from the client permissions list. |
RemoveUserFromPFRecursive.ps1 |
This script removes a user from the client permissions list for a public folder and from all the folders beneath it in the hierarchy. This script accepts the following parameters:
|
See Also
Concepts
Understanding Public Folders
Managing Public Folders
Exchange Management Shell
© 2010 Microsoft Corporation. All rights reserved.