So here is the command to simply copy/sync one AppPool from one machine to another.
msdeploy -verb:sync -source:appPoolConfig=MyMagicPool, -dest:appPoolConfig=MyMagicPool,computername=destinationMachineName
This will make an exact copy. Now, to change the identity on the destination side, you have to add the following replace rules to the command line above.
-replace:objectName=processModel,targetAttributeName=userName,replace=NewUserName
-replace:objectName=processModel,targetAttributeName=password,replace=NewPassword
Doing replace rules is complicated, but can usually accomplish what you seek. As in this case.
Hope that helps