Here is how you can remove public folder replicas from a specific Exchange Server.

Run the below command in the Exchange Management shell have to mapping to Exchange Servers Program Files and then Scripts (Default is Program FilesMicrosoftExchange ServerScripts)

.RemoveReplicaFromPFRecursive.ps1 -TopPublicFolder "" –ServerToRemove ChangetoServerNametoRemoveReplicasFrom