Pcornel
Automation · PowerShell Automation

PowerShell Remoting

Cheat sheet · https://pcornel.dk/topic.php?topic=5241

Back to the Topic

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 listener
  • Invoke-Command -ComputerName <host> -ScriptBlock { hostname } — remote command
  • Enter-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

BoundaryPowerShell Remoting reference
Runtime identityPowerShell edition/version + command/module source
Persistent intentScript/module/config prerequisites under source control
VerificationRead-only discovery → execution evidence → independent target read-back
Output contractStructured objects/streams before formatting
Failure boundarySeparate 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

Confirmation

Confirm action

Continue?