Below is a quick WMIC CMD line that will change the site assignment of a client remotely. Bare in mind that account you use must have Administrative access to the machine you are targeting.
Wmic.exe /node:"TARGET-MACHINE-NAME-HERE" /namespace:\\root\ccm path sms_client CALL SetAssignedSite "P01" /NOINTERACTIVE
This version will read from a text file the machines that require the Site Code change. Again though, bare in mind that the account running the command must have Administrative access to the machines in question.
Wmic.exe /node:@Machines.txt /namespace:\\root\ccm path sms_client CALL SetAssignedSite "P01" /NOINTERACTIVE