Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $certsname = Get-ChildItem -Path Cert:\LocalMachine\AuthRoot | Select FriendlyName,Thumbprint
- $output = "{`n`"data`":[`r`n`r`n"
- foreach ($currentcert in $certsname)
- {
- $line= "{ `"{#CERTID}`" : `"" + $($currentcert.Thumbprint) + "`" },`r`n{ `"{#CERT}`" : `"" + $($currentcert.friendlyname) + "`" },`r`n"
- $output+=$line
- }
- $output=$output -replace ",`r`n$","`r`n]`r`n}"
- $output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement