Let's perform the following steps:
- When administrators perform remoting for the first time, many run into trouble and immediately resort to old (and insecure) tools such as PSExec or remote WMI:
Enter-PSSession -ComputerName PACKT-DC1
- Just by specifying credentials, PowerShell will try to negotiate the authentication mechanism so that either Kerberos or NTLM is used:
Enter-PSSession -ComputerName PACKT-DC1 -Credential contoso\Install
- Notice how your prompt has changed—you are now working on the remote machine. Be sure to exit the session once you're done:
Exit-PSSession
- You can easily test whether a remote can be connected to as well:
Test-WSMan -ComputerName PACKT-DC1 -Credential contoso\Install -Authentication Negotiate ...