Gary_Mo
(Gary Mo)
1
In these days, I tried to use ansible to manage windows server.
But met trouble after I generate a certificate:
https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html#generate-a-certificate
After mapping the certificate by command:
`
jborean
(Jordan Borean)
2
The certificate mapping can be accessed through the WSMan provider at ‘WSMan:\localhost\ClientCertificate’.
To delete all the mappings run
Remove-Item -Path WSMan:\localhost\ClientCertificate\* -Force -Recurse
To delete a mapping for a particular account run
Remove-Item -Force -Recurse -Path (Get-ChildItem -Path WSMan:\localhost\ClientCertificate\*\UserName | Where-Object { $_.Value -eq "username" }).PSParentPath
Thanks
Jordan