Resposta parcial:
Obter e definir afinidade:
PowerShell "Get-Process app | Select-Object ProcessorAffinity"
PowerShell "$Process = Get-Process app; $Process.ProcessorAffinity=255"
obtenha todos os processos:
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-powershell-1.0/ee176855(v=technet.10)