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