Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To get this to work, you must configure both your local and remote computers. </p> <p><strong>On the remote server</strong>, run the following command:</p> <pre><code> Enable-WSManCredSSP -Role server </code></pre> <p>You'll know things are confgured correctly if you run the <code>Get-WSManCredSSP</code> cmdlet and get the following output:</p> <blockquote> <p>The machine is not configured to allow delegating fresh credentials. This computer is configured to receive credentials from a remote client computer.</p> </blockquote> <p><strong>On your local computer</strong>, from an Administrative PowerShell prompt, you need to allow credential delegation in PowerShell. Run the following command:</p> <pre><code> Enable-WSManCredSSP -Role Client -DelegateComputer &lt;REMOTE_COMPUTER_NAME&gt; </code></pre> <p>You can enable all servers by using * for <code>REMOTE_COMPUTER_NAME</code>.</p> <p>You'll know this is configured correctly when you run Get-WSManCredSSP and get the following output:</p> <blockquote> <p>The machine is configured to allow delegating fresh credentials to the following target(s): wsman/REMOTE_SERVER_NAME<br> This computer is not configured to receive credentials from a remote client computer.</p> </blockquote> <p><strong>On your local machine</strong>, update Group Policy to allow your credentials to be delegated to the remote server. </p> <ol> <li>Open gpedit.msc and browse to Computer Configuration > Administrative Templates > System > Credentials Delegation. </li> <li>Double-click "Allow delegating fresh credentials with NTLM-only Server Authentication". </li> <li>Enable the setting and add the build server to the server list as WSMAN/BuildServerName. (You can enable all servers by entering WSMAN/*.)</li> </ol> <p>Then, when you need to run your command on the remote server, <strong>you can't use any of the *-PSSession commands</strong> because CredSSP can't use cached credentials. You have to start the session using <code>Invoke-Command</code>, and use CredSSP as the value to the Authentication parameter, like so:</p> <pre><code>Invoke-Command -ScriptBlock { # remote commands here } ` -ComputerName &lt;REMOTE_COMPUTER_NAME&gt; ` -Authentication CredSSP ` -Credential &lt;USERNAME&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload