Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

PowerShell Remoting · PowerShell Automation

Direct 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.

When to use this

Use this when running PowerShell on remote computers.

First 30 seconds

1. PowerShell Remoting runs commands on remote hosts (WinRM or SSH).

2. Kerberos in domains; HTTPS for others.

3. Fan-out with Invoke-Command.

4. Double-hop issue — avoid CredSSP, use resource-based delegation or JEA.

5. Restrict with JEA.

Operational verification

controller → WinRM/SSH → remote session → results

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
PowerShell 7.5/current
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformPowerShell 7.5/current · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when running PowerShell on remote computers.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points
  • Remoting uses WinRM or SSH.
  • Kerberos is used inside a domain.
  • The double-hop problem blocks access to a third server.
Key checks
  • Test-WSMan <host> — WinRM listener
  • Invoke-Command -ComputerName <host> -ScriptBlock { hostname } — remote command
  • Enter-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
TopicNote
AuthenticationKerberos in domains; HTTPS + certificate otherwise
Second hopCredentials do not pass on by default (use RBCD or JEA, avoid CredSSP)
JEAConstrained endpoints that allow only specific commands
EnableEnable-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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Configuration example

PowerShell 7.5/current 7.5/currentMinimal authored PowerShell pattern for PowerShell Remoting

Assumptions: Review target identity, permissions and environment before mutation.

$s = New-PSSession -ComputerName server01
Invoke-Command -Session $s -ScriptBlock { $PSVersionTable.PSVersion }
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docPowerShell 7.5/current 7.5/current

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%
Embedded reference data

Quick lookup tables

PowerShell Remoting · PowerShell operational reference

Topic-specific PowerShell runtime identity, persistence, verification, output and failure-boundary lookup.

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
Depth when you need it

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.

Confirmation

Confirm action

Continue?