Administrator (elevated prompt)
Invoke-Command -ComputerName <computer> -ScriptBlock { <command> }
Invoke-Command -ComputerName <computer> -ScriptBlock { <command> }
Runs a script block on one or more remote computers over PowerShell Remoting (WinRM) and returns the results.
You need to run the same check or change on several servers.
Test the remote endpoint with Test-WSMan <computer>.
Privilege Administrator (elevated prompt)State impact Changes stateProduction Unknown
Field glossary
Important fields projected from persisted Command guidance.
output objects with PSComputerName, or errors such as "WinRM cannot complete the operation"Important persisted output field; use surrounding guidance for interpretation.
Used in these Topics
Each relation carries both placement role and operational semantic: verifies, configures, troubleshoots, collects evidence, changes state or general.
Evidence boundary
What this output can establish — and where you must not over-claim.
Shows the output of the command on each remote computer.
Does not prove the result is the same as running it locally (different profile or rights).
Test the remote endpoint with Test-WSMan <computer>.
Command guidance
Execution context
Administrator (elevated prompt)
Use when
You need to run the same check or change on several servers.
Important fields
output objects with PSComputerName, or errors such as "WinRM cannot complete the operation"
Common problems
WinRM not enabled or blocked by firewall; second-hop credential problem
Operational impact
Can change state on the target computers, depending on the script block.
Technical context
Whether it changes anything depends on the script block. Test with a read-only command first.