Table 1: Sample PowerShell Scripts Provided with Exchange 2007 to Manage Public Folders

Script

Description

AddReplicaToPFRecursive

Adds a server to the replication list for a public folder and all its child folders.

RemoveReplicaFromPFRecursive

Removes a server from the replication list for a public folder and all its child folders. If the server is the only one in the replication list, the script leaves the list unchanged.

MoveAllReplicas

Replaces a server in the replication list for all public folders and system folders with a new server.

ReplaceReplicaOnPFRecursive

Replaces a server in the replication list for a folder and all its child folders with a new server. If the server you want to replace isn't listed, nothing is changed.

AddUsersToPFRecursive

Adds a user to a folder’s permissions list and the permissions lists of all child folders. If the user is already listed, the permission is updated to the set specified in the script.

ReplaceUserWithUserOnPFRecursive

Replaces a user with a new user on a folder’s permissions list and on the permissions lists of all child folders. Folders that don't contain an entry for the specified user aren't altered.

ReplaceUserPermissionOnPFRecursive

Replaces a user’s permissions on a folder’s permissions list and on the permissions lists of all child folders with a new set of permissions.

RemoveUserFromPFRecursive

Removes a user from a folder’s permissions list and all child folders’ permissions lists. “Default” and “Anonymous” permissions can't be removed, but an attempt to remove them changes their permissions to “None.”