Replica Creation Scrip

Is there a sample script (for button) to create a local email replica (if a local replica doesn’t exist) and enable the replication setting in the location document (if it is not already enabled).

Thanks.