################################################################
# Windows Powershell - Certificates commands
################################################################


#get user certificates
Get-ChildItem -Path Cert:\CurrentUser\My

#show root certificates
Get-ChildItem -Path Cert:\LocalMachine\Root

#show specific root certificates
Get-ChildItem -Path Cert:\LocalMachine\Root -Filter "IssuedTo=OpenAI"

#show to delete a certificate
certutil -delstore Root <Thumbprint>

#show root certificates with a match
Get-ChildItem Cert:\LocalMachine\Root\ | where-Object {$_.subject -Match "yourmatch"}

#show root certificates with a match and details (fl = format-list cmdlet)
Get-ChildItem Cert:\LocalMachine\Root\ | where-Object {$_.subject -Match "yourmatch"} | fl


#delete specific root certificates
Get-ChildItem Cert:\LocalMachine\Root\ | where-Object {$_.subject -Match "yourmatch"} | remove-item

computer2know :: thank you for your visit :: have a nice day :: © 2024