Use this when running PowerShell on remote computers.
PowerShell Remoting · PowerShell Automation
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.
controller → WinRM/SSH → remote session → results
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
Verify local PowerShell version, transport reachability, endpoint availability and authenticated session identity before testing the real command. Use Test-WSMan where WinRM is relevant, New-PSSession/Get-PSSession, then run a read-only command such as hostname/version and inspect returned object type. After mutation, query the target again through an independent read command.
Step 2 Common mistakes Narrow the fault
- Second-hop authentication problems.
Step 3 Where it fails Narrow the fault
A successful WinRM or SSH connection does not show a PowerShell endpoint is authorized for the required command, and a healthy PSSession does not show the target application is healthy. Double-hop/delegation problems can occur only when the remote command accesses a third resource. Separate transport, authentication, endpoint authorization, serialization and target-state outcome.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Remoting uses WinRM or SSH.
- Kerberos is used inside a domain.
- The double-hop problem blocks access to a third server.
Test-WSMan <host>— WinRM listenerInvoke-Command -ComputerName <host> -ScriptBlock { hostname }— remote commandEnter-PSSession <host>— interactive
ReferenceWhy it matters1 section · depth on demand
In depth
PowerShell Remoting runs commands on remote computers over WinRM (HTTP 5985/HTTPS 5986) or, in PowerShell 7, over SSH. Commands run remotely and only results come back, so many machines can be managed in parallel.
Invoke-Command -ComputerName srv01, srv02 -ScriptBlock { Get-Service W32Time }
$s = New-PSSession -HostName linux01 -UserName admin # SSH transport
Enter-PSSession -ComputerName srv01
| Topic | Note |
|---|---|
| Authentication | Kerberos in domains; HTTPS + certificate otherwise |
| Second hop | Credentials do not pass on by default (use RBCD or JEA, avoid CredSSP) |
| JEA | Constrained endpoints that allow only specific commands |
| Enable | Enable-PSRemoting (default on Windows Server) |
ReferenceImportant terms & boundaries1 section · depth on demand
PowerShell mechanics
PowerShell remoting uses the PowerShell Remoting Protocol (PSRP) over a transport such as WinRM on Windows and can also use SSH in modern PowerShell. A remote endpoint creates session/runspace state on the target, executes commands there and serializes returned objects back to the caller. Authentication, authorization, endpoint configuration, transport health and command success are distinct layers.
ReferenceConfiguration & state1 section · depth on demand
Authoring and lifecycle
Choose transport and endpoint deliberately, constrain who can connect and what endpoint capabilities are exposed, and reuse PSSession objects when session state or connection setup cost matters. Treat credentials, delegation/second-hop requirements and host-key/certificate trust as explicit dependencies. Remote variables passed with $using: or arguments cross a serialization/execution boundary and should not be assumed to remain live references.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Review target identity, permissions and environment before mutation.
$s = New-PSSession -ComputerName server01
Invoke-Command -Session $s -ScriptBlock { $PSVersionTable.PSVersion }Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Microsoft Learn documentation reviewed for bounded PowerShell reference claims. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_remote_requirements?view=powershell-7.5 · confidence 94%Quick lookup tables
PowerShell Remoting · PowerShell operational reference
Topic-specific PowerShell runtime identity, persistence, verification, output and failure-boundary lookup.
| 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 |
Deep reference
Healthy vs suspicious evidence
Output interpretation
Remote output often arrives as deserialized objects whose type names are prefixed with Deserialized. and whose methods are not live target methods. Transport/authentication errors must be distinguished from remote command ErrorRecords. Capture computer/session identifiers and remote error metadata because the local formatted message can collapse these boundaries.