3

i'm searching for a way to edit this policy via powershell :

Computer Configuration -> Administrative Templates -> System -> Credentials Delegation -> Allow Delegating Fresh Credentials with NTLM-only Server Authentication

I want to activate it, and put * in value.

I already tried it, but it doesn't work :

$allowed = @('WSMAN/*')            

$key = 'hklm:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation'
if (!(Test-Path $key)) {
    md $key
}
New-ItemProperty -Path $key -Name AllowFreshCredentials -Value 1 -PropertyType Dword -Force            

$key = Join-Path $key 'AllowFreshCredentials'
if (!(Test-Path $key)) {
    md $key
}
$i = 1
$allowed |% {
    New-ItemProperty -Path $key -Name $i -Value $_ -PropertyType String -Force
    $i++
}

It doesn't work, Powershell generates me an error "The WinRM client cannot process the request. A computer policy does not allow the delegation of the user credentials to the target computer"

I also tried to activate manually the policy and it works.

My computer is not in domain, but in workgroup and i'm running Windows 7 with Powershell v4.0.

Thanks for your help

  • What exactly do you mean when you write "I already tried it, but it doesn't work" – Mathias R. Jessen Jul 16 '14 at 15:09
  • I edited my topic @MathiasR.Jessen – Adeel ASIF Jul 16 '14 at 15:17
1

This is how i resolved it :

New-ItemProperty -Path 'hklm:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation' -Name "AllowFreshCredentialsWhenNTLMOnly" -Value 1 -PropertyType Dword -Force     

New-Item -Path 'hklm:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation'  -Name "AllowFreshCredentialsWhenNTLMOnly" -Value "Default Value" -Force

New-ItemProperty  -Path 'hklm:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly' -Name "1" -PropertyType "String" -Value '*'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.