PowerShell 2 added a lot of stuff for accessing remote computers with it.
Here's some useful cmdlets to look into (info from PowerShell's get-help
):
Enter-PSSession
:
SYNOPSIS
Starts an interactive session with a remote computer.
DESCRIPTION
The Enter-PSSession cmdlet starts an interactive session with a single remote computer. During the session, the commands that you type
run on the remote computer, just as though you were typing directly on
the remote computer. Youcan have only one interactive session at a
time.
Typically, you use the ComputerName parameter to specify the name of the remote computer. However, you can also use a session that you
create by using New-PSSession for the interactive session.
To end the interactive session and disconnect from the remote computer, use the Exit-PSSession cmdlet, or type "exit".
New-PSSession
:
SYNOPSIS
Creates a persistent connection to a local or remote computer.
DESCRIPTION
The New-PSSession cmdlet creates a Windows PowerShell session (PSSession) on a local or remote computer. When you create a PSSession, Windows PowerShell establishes a persistent connection to the remote computer.
Use a PSSession to run multiple commands that share data, such as a function or the value of a variable. To run commands in a PSSession, use the Invoke-Command cmdlet. To use the PSSession to interact directly with a remote computer, use the Enter-PSSession cmdlet. For more information, see about_PSSessions.
Invoke-Command
:
SYNOPSIS
Runs commands on local and remote computers.
DESCRIPTION
The Invoke-Command cmdlet runs commands on a local or remote computer and returns all output from the commands, including errors. With a single Invoke-Command command, you can run commands on multiple computers.
To run a single command on a remote computer, use the ComputerName parameter. To run a series of related commands that share data, create a PSSession (a persistent connection) on the remote computer, and then use the Session parameter of Invoke-Command to run the command in the PSSession.
More info: Hey, Scripting Guy! Tell Me About Remoting in Windows PowerShell 2.0