Use this topic when Enter-PSSession/Invoke-Command/New-PSSession fails, remote objects are deserialized, double-hop/resource access fails, PowerShell 7 endpoints differ from Windows PowerShell endpoints, or you need to choose persistent vs ephemeral remote execution.
PowerShell Remoting · PowerShell
PowerShell Remoting uses the PowerShell Remoting Protocol (PSRP) to run commands in another PowerShell session. On Windows, WSMan/WinRM is the traditional transport; modern PowerShell also supports SSH remoting. Transport, authentication, endpoint/session configuration and target authorization are separate layers.
1. Test-WSMan <host> — WinRM answers?
2. Enter-PSSession <host> / Invoke-Command -ComputerName <host> {hostname}.
3. Access denied → member of Administrators or Remote Management Users?
4. Workgroup/IP → TrustedHosts or HTTPS listener.
5. Double hop → use CredSSP alternatives (JEA, resource-based delegation).
client → WinRM (5985/5986) → authentication (Kerberos/NTLM/cert) → session on the remote host → command runs
Run the smallest target command in the remote runspace; if it reaches another system, inspect second-hop credentials/authorization separately.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Enter-PSSession -ComputerName <computer>Primary Commands
Configuration and operational commands for this Topic.
Enter-PSSession -ComputerName <computer>ReferenceOpens an interactive PowerShell session on a remote computer.
Use when: You need to work interactively on a server without RDP.
Quick note: Exit with Exit-PSSession. Commands you run in the session can change the remote system.
Windows / Windows Server / PowerShell · stateInvoke-Command -ComputerName <computer> -ScriptBlock { <command> }ReferenceRuns a script block on one or more remote computers over PowerShell Remoting (WinRM) and returns the results.
Use when: You need to run the same check or change on several servers.
Quick note: Whether it changes anything depends on the script block. Test with a read-only command first.
Windows / Windows Server / PowerShell · mixedVerification & 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
Start with a minimal identity/version probe in the same transport and endpoint. Record client/target identity, endpoint, engine version and authentication method. Then add the target command. If only downstream access fails, isolate delegation/credential scope instead of changing firewall/WinRM broadly.
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.
- Network reachability to a host/port does not prove a PowerShell remoting endpoint is usable.
- Authentication success does not prove authorization inside the session or on downstream resources.
- PowerShell 7 and Windows PowerShell can expose different remoting endpoints/configurations.
- Remote objects are commonly serialized and may not retain live methods.
- Double-hop/delegation issues are credential-forwarding boundaries, not generic network failures.
Test-WSMan <host>— WinRM reachability$PSVersionTable— PowerShell edition and versionGet-Command <name>— which cmdlet/function/exe runsGet-Help <cmdlet> -Full— syntax and parametersGet-ExecutionPolicy -List— execution policy per scope
ReferenceWhat it is1 section · depth on demand
Core model
PowerShell Remoting abstracts remote command execution, but its failure modes span several systems. A client may reach TCP/WSMan yet fail authentication; authenticate but be denied an endpoint; enter a session yet lack a module; run a command but fail when that command reaches a second network resource.
ReferenceWhy it matters1 section · depth on demand
Internals and state
Topic-specific scope
Local intent: PowerShell Remoting/PSRP model: one-to-one and one-to-many sessions, WinRM/WSMan on Windows, SSH transport, session configurations, authentication, serialization and authorization.
ReferenceImportant terms & boundaries2 sections · depth on demand
PowerShell boundary
Invoke-Command is suited to one-to-many/discrete execution, while PSSession objects preserve a remote session across commands. The returned data is serialized for transport, so design remote code to perform method-dependent work remotely and return the necessary structured properties.
In depth
PowerShell remoting runs commands on remote machines over WinRM (HTTP 5985/HTTPS 5986) or SSH (PowerShell 7).
Enable-PSRemoting -Force
Invoke-Command -ComputerName srv01,srv02 -ScriptBlock { Get-Service W32Time }
$s = New-PSSession -ComputerName srv01; Invoke-Command -Session $s { $env:COMPUTERNAME }; Copy-Item .\tool.zip -ToSession $s -Destination C:\Temp
Enter-PSSession srv01
Invoke-Command -HostName linux01 -UserName ops -ScriptBlock { uname -a } # SSH transport
The second-hop problem: from a remote session you cannot access a third machine with your credentials by default — use resource-based Kerberos constrained delegation, pass credentials explicitly, or JEA endpoints.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in PowerShell → PowerShell Remoting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/powershell/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
PowerShell → PowerShell Remoting reference map
Fast lookup boundaries for PowerShell → PowerShell Remoting.
| Item | Meaning | Evidence boundary |
|---|---|---|
| Transport | WSMan/WinRM or SSH path | port reachability alone is insufficient |
| Authentication | Remote identity establishment | not target/downstream authorization |
| Endpoint | PowerShell session configuration | can differ by engine/version |
| Runspace | Remote execution context | modules/profile/language mode may differ |
| Serialization | Return-object transport | can remove live methods/type fidelity |