Quantcast
Channel: Public Key Infrastructure PowerShell module
Viewing all articles
Browse latest Browse all 729

New Post: Certificate recieving ends after 30 minutes with "The handle is invalid"

$
0
0
Is there any way to avoid making many calls if it's neсessary to do smth like this:
Get-ChildItem $pathCertSuspendedValidExport -Name|ForEach-Object -Process {$SN=$_ -replace ".cer"; Connect-CertificationAuthority -ComputerName $CN|Get-IssuedRequest -Filter "Disposition -eq 20","NotAfter -ge $DT","SerialNumber -eq $SN" -Property "RawCertificate"| %{[IO.File]::WriteAllText("$pathCertIssuedExport\$($_.SerialNumber).cer", $_.RawCertificate)}}
$pathCertSuspendedValidExport contains all valid suspended certificates, so i'm truing to find out if there is any of them that become unrevoked

I've tried to put all filenames in $pathCertSuspendedValidExport in massive by this code:
$SN = @(Get-ChildItem $pathCertSuspendedValidExport -Name -exclude "DT.txt"|ForEach-Object -process {$_ -replace ".cer"})
But don't know how to compare SerialNumber in filter with every massive value without using foreach.

Viewing all articles
Browse latest Browse all 729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>