Tag: pssession

Open a PSSession

Open a PSSession

How to run commands including PowerShell commands on a remote machine using PSsession

An alternative way to run commands remotely you can open a PS Session to a remote machine. What ever you type in the PS Session command prompt will run on the remote machine.

• Create a session (New-PSSession)
• Use the session (Enter-PSSession)
• Leave the session (Exit-PSSession or simply Exit)
• Close the session (Remove-PSSession)