Professional Documents
Culture Documents
About Remote - Help
About Remote - Help
about_Remote
SHORT DESCRIPTION
Describes how to run remote commands in Windows PowerShell.
LONG DESCRIPTION
You can run remote commands on a single computer or on multiple
computers by using a temporary or persistent connection. You can also
start an interactive session with a single remote computer.
This topic provides a series of examples to show you how to
run different types of remote command. After you try these basic
commands, read the Help topics that describe each cmdlet that is
used in these commands. The topics provide the details and explain
how you can modify the commands to meet your needs.
Note: To use Windows PowerShell remoting, the local and remote computers
must be configured for remoting. For more information, see
about_Remote_Requirements.
HOW TO START AN INTERACTIVE SESSION (ENTER-PSSESSION)
The easiest way to run remote commands is to start an
interactive session with a remote computer.
When the session starts, the commands that you type run on the
remote computer, just as though you typed them directly
on the remote computer. You can connect to only one
computer in each interactive session.
To start an interactive session, use the Enter-PSSession
cmdlet. The following command starts an interactive session
with the Server01 computer:
enter-pssession server01
The command prompt changes to indicate that you are connected
to the Server01 computer.
Server01\PS>
Now, you can type commands on the Server01 computer.
To end the interactive session, type:
exit-pssession
For more information, see Enter-PSSession.
HOW TO USE CMDLETS THAT HAVE A COMPUTERNAME PARAMETER TO GET REMOTE DATA
Several cmdlets have a ComputerName parameter that lets you
get objects from remote computers.
Limit-EventLog
New-EventLog
Remove-EventLog
Restart-Computer
Show-EventLog
Show-Service
Stop-Computer
Write-EventLog