Screensie
← All guides

Command Line

PowerShell Remoting Basics

Use authenticated PowerShell remoting on computers you are authorized to administer.

Updated September 2, 2026Difficulty: EasyTime: 7 minApplies to: Windows, Windows 10, Windows 11

Follow the steps in order and stop if the screen or target does not match what is described. Use administrator access only when the task requires it.

Confirm authorization

Remote administration requires permission from the system owner and appropriate administrator policy.

Use managed configuration

Configure PowerShell remoting through organizational policy where possible. Avoid broad TrustedHosts entries.

Test WinRM

Test the target's WS-Management endpoint.

Command
Test-WSMan -ComputerName PC-NAME

Run a read-only command

Use an explicit computer name and a credential handled by PowerShell's secure prompt.

Command
Invoke-Command -ComputerName PC-NAME -ScriptBlock { Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion }

Close persistent sessions

Remove PSSessions when finished.

Command
Get-PSSession | Remove-PSSession

Review network exposure

Never expose WinRM directly to the public internet. Use firewalls, trusted network boundaries, and current authentication.