How to Run PowerShell Commands on Remote Computers

Invoke-Command -ComputerName COMPUTER -ScriptBlock { COMMAND } -credential