Solved it by running Powershell with BuiltIn administrator account
Set-AdfsSslCertificate localhost Access denied

I renew SSL certificate for ADFS and need to update configuration
Set-AdfsSslCertificate -Thumbprint XXXXc4f8b2d239bXXXXXXXXXXXXXX
And getting:
PS0317: One or more of AD FS servers returned errors during execution of command 'Set-AdfsSslCertificate'. Error information: PS0316: AD FS Server:
'localhost', Error: 'Connecting to remote server localhost failed with the following error message : Access is denied. For more information, see the
about_Remote_Troubleshooting Help topic.'.
Enter-PSSession for localhost only works afters -credentials are supplied
Enter-PSSession localhost -Credential $(Get-Credential)
Invoke-Command -ComputerName localhost -Credential $(Get-Credential) -ScriptBlock {Set-AdfsSslCertificate -Thumbprint XXXXc4f8b2d239b7dbeXXXXXXXXXXXXXXX}
also fails with same message
winrm get winrm/config/listener?Address=*+Transport=HTTP
Listener [Source="GPO"]
Address = *
Transport = HTTP
Port = 5985
Hostname
Enabled = true
URLPrefix = wsman
CertificateThumbprint
ListeningOn = 127.0.0.1, 1.1.1.1, ::1, fe80::5cb5:74ea:9e1d:1b0c%14
-
1 additional answer
Sort by: Most helpful
-
Peter Puga 6 Reputation points
2020-12-29T10:43:01.43+00:00 Solved it by removing account from Protected Users group.
-