# Other Computers

Run commands on another computer, and check the network between you. Practiced against the learner's own PC (`localhost`), so nothing costs money.

Updated: November 10, 2026

## [Remoting](https://www.ask-codey.com/courses/powershell-in-depth/topics/powershell-remoting)

1. [PowerShell Remoting: Invoke-Command and Enter-PSSession](https://www.ask-codey.com/lessons/powershell-remoting) (Freelancer): Invoke-Command carries a script block to one computer or many at once and brings each answer back with a PSComputerName, Enter-PSSession moves your prompt onto another computer until Exit-PSSession, and both travel over WinRM between Windows PCs at work, or over SSH with -HostName at home and on a Mac or Linux.
2. [Copying to Another Computer](https://www.ask-codey.com/lessons/powershell-copy-to-session) (Journeyman): A shared folder has a network address, a UNC path such as \\\\back-office\\reports, that Test-Path, Get-ChildItem and Copy-Item use like any other path, and where there's no share, Copy-Item -ToSession and -FromSession copy a file through a remoting session made with New-PSSession and closed with Remove-PSSession.

## [The Network](https://www.ask-codey.com/courses/powershell-in-depth/topics/powershell-the-network)

1. [Is It the Network? Test-Connection and Friends](https://www.ask-codey.com/lessons/powershell-network-checks) (Journeyman): When one computer can't reach another, four questions in order find where it breaks, each with its own command, Get-NetIPAddress for whether this PC has an address, Resolve-DnsName for whether the name turns into an address, Test-Connection for whether the computer answers, and Test-NetConnection -Port for whether the program's door is open.

## [Exercise: Check a Remote PC](https://www.ask-codey.com/courses/powershell-in-depth/topics/exercise-powershell-check-a-remote-pc)

1. [Exercise: Check a Remote PC](https://www.ask-codey.com/lessons/exercise-powershell-check-a-remote-pc) (Freelancer): Finish two tools for a small office's PCs, Test-PcConnection to say whether each PC answers and whether its remoting door is open, and Get-PcHealth to check free space and the print service right here for your own PC and through Invoke-Command only for another PC whose door is open, while a Pester check stands in for the other PCs so nothing needs remoting turned on.

Source: https://www.ask-codey.com/courses/powershell-in-depth/chapters/powershell-other-computers
