Enter-PSSession – Interactive session with a remote computer

Enter-PSSession starts an interactive session with a remote computer.

Syntax:
Enter-PSSession -ComputerName ServerName

Example:
Enter-PSSession -ComputerName WebServer01

You can now execute the hostname command to confirm that you are connected to a remote server. you can perform all the required command execution and once done use the command Exit to exit the session.

Thanks,
WintelAdmin

Facebook Comments
Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *