Automation · PowerShell Automation
PowerShell Remoting
Cheat sheet · https://pcornel.dk/topic.php?topic=5241
Answer
PowerShell Remoting runs commands on other computers with Invoke-Command or Enter-PSSession, over WinRM on Windows or SSH in PowerShell 7, using Kerberos for domain authentication.
Remember
- Remoting uses WinRM or SSH.
- Kerberos is used inside a domain.
- The double-hop problem blocks access to a third server.
First checks
Test-WSMan <host>— WinRM listenerInvoke-Command -ComputerName <host> -ScriptBlock { hostname }— remote commandEnter-PSSession <host>— interactive
Verify in this order
controller → WinRM/SSH → remote session → results
Where it usually breaks
Script/input → command/module binding → local/remoting session → request accepted → command result → target object read-back → effective runtime state → workload.
PowerShell Remoting · PowerShell operational reference
| Boundary | PowerShell Remoting reference |
|---|---|
| Runtime identity | PowerShell edition/version + command/module source |
| Persistent intent | Script/module/config prerequisites under source control |
| Verification | Read-only discovery → execution evidence → independent target read-back |
| Output contract | Structured objects/streams before formatting |
| Failure boundary | Separate engine/binding from transport/API/native and target-state failures |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5241