As I went looking for very similar information using PowerShell, I found the information I needed here: http://www.energizedtech.com/2010/07/powershell-setting-processor-a.html
You didn't mention which Windows OS you were using, (The older ones didn't come with PowerShell, although you could install it if it's not there).
The quick of it, is that in PowerShell, process affinity is simply a property you can change easily.
To see the properties (and other tidbits of info) of your process (using foo as an example process), the PowerShell command would be:
Get-Process foo | Get-Member
You'll see ProcessorAffinity is one of those properties. Changing it is trivial, and you can select which core you want to run on, using the values from Revolter's table/link above.
To see what the value of the ProcessorAffinity property is for foo, here's the command:
So if you wanted to run foo on cpu 4 only, you would set the value as such: