# PowerShell Remoting: Invoke-Command and Enter-PSSession

Invoke-Command carries a script block to one computer or many at once and brings each answer back with a PSComputerName, Enter-PSSession moves your prompt onto another computer until Exit-PSSession, and both travel over WinRM between Windows PCs at work, or over SSH with -HostName at home and on a Mac or Linux.

![Cheat sheet for the lesson PowerShell Remoting: Invoke-Command and Enter-PSSession: Invoke-Command carries a script block to one computer or many at once and brings each answer back with a PSComputerName, Enter-PSSession moves your prompt onto another computer until Exit-PSSession, and both travel…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/762ddd6e52574b99a3f1f10e1ef54184.webp)

- Category: PowerShell
- Level: Freelancer
- Tags: enter-pssession, invoke-command, localhost, operating-system, powershell, remoting, script-block, winrm
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/powershell-remoting-cheat-sheet
