Tinus EngOps Wiki

Logo

OpsaC - Operating as PowerShell code

Links

Home

IT-Wiki

PowerShell Blog

PowerShell Index

PowerShell Search

Additional Websites

View my GitHub Profile

View my GitHub Gists

View my Codeberg Page

View my Photo Website

Certificate Store

published: September 13, 2018 author: Tinu tags: Certificate categories: PowerShell


Certificates auflisten

$ret = @()
$Issuer = '*'
$certs = Get-ChildItem Cert:\LocalMachine -Recurse | Where-Object Issuer -match "CN=$Issuer"
foreach($item in $certs){
    $obj = [PSCustomObject]@{
        Issuer = $item.Issuer
        NotBefore = $item.NotBefore.Date
        NotAfter = $item.NotAfter.Date
        KeySize = $item.PublicKey.Key.KeySize
    }
    $ret += $obj
}
$ret

← Previous Post ◇ [ Top ] ◇ Copyright © 2024 by tinuwalther ◇ [ Blog ] ◇ Next Post →