Berichte über die Zertifizierungsstelle per Mail

Wieder etwas Zuwachs in der *Reporter Familie, der CA-Reporter ist fertig. CA Reporter erstellt ganz ähnlich wie Exchange Reporter einen Bericht über die Zertifizierungsstelle und deren Zertifikate. Folgende Funktionen sind bisher enthalten:

  • Status der CA
  • Status des Stammzertifizierungsstellenzertifikats (Root-Zertifikat)
  • Status der Sperrlisten
  • Benutzer mit Zugriff auf die CA
  • Übersicht der Zertifikatsvorlagen
  • Übersicht bereits abgelaufene Zertifikate
  • Übersicht über Zertifikate die in weniger als 30 Tagen ablaufen

Vorschläge zu weiteren Funktionen werden gerne entgegen genommen (Bitte Kontaktformular nutzen)

Zertifizierungsstelle

Der CA Reporter kann, wie Exchange Reporter auch, über eine geplante Aufgabe gestartet werden. Eine Installationsanleitung findet sich im .ZIP Archiv.

image

Folgende Voraussetzungen müssen erfüllt sein:

  • Windows Server 2008, 2008 R2, 2012 oder 2012 R2, Windows 7, 8
  • ActiveDirectory Integrierte Zertifizierungssstelle
  • mindestens PowerShell 3.0
  • PowerShell PKI Module (PSPKI) Download: https://pspki.codeplex.com/

Hier kann der CA Reporter runtergeladen werden:

14 Gedanken zu „Berichte über die Zertifizierungsstelle per Mail“

  1. hey Frank,
    ich habe ebenfalls die Fehlermeldungen zum Thema Geht-Date -format
    Gibt es in der Zwischenzeit schon eine Lösung?
    Eingesetzter Server ist ein Windows Server 2019 x64 English

    Gruß
    Holger

    Antworten
  2. hat das Script eigentlich jemand zum Laufen gekriegt unter Windows Server 2022?

    Bekomme da durchgehend Probleme mit dem get-date wie es ausschaut (Server sind auf english installiert)

    Antworten
  3. Ich erhalte beim Punkt „Lade globale Variablen“ folgenden Fehler:
    -Start– 07/30/2019 19:56:55 ———————————————————————————-
    Ausnahme beim Aufrufen von „EnumEnterpriseCAs“ mit 2 Argument(en): „Der Netzwerkpfad wurde nicht gefunden.

    Kann jemand helfen?

    Antworten
  4. Hallo Frank,

    vielen Dank für tollen Arbeit. Das Skript funktioniert obwohl ich beim Ausführen die folgende Fehlermeldung bekomme:

    Erstelle CA Report:get-date : The input object cannot be bound to any parameters for the command either because the com
    and does not take
    ipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    t C:\Admin\CA-Reporter\New-CAReport.ps1:218 char:48
    $rootcertstart = $ca.Certificate.NotBefore | get-date -Format „dd.MM.yyyy HH:m …
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    et-date : The input object cannot be bound to any parameters for the command either because the command does not take
    ipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    t C:\Admin\CA-Reporter\New-CAReport.ps1:219 char:45
    $rootcertend = $ca.Certificate.NotAfter | get-date -Format „dd.MM.yyyy HH:mm“
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    et-date : The input object cannot be bound to any parameters for the command either because the command does not take
    ipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    t C:\Admin\CA-Reporter\New-CAReport.ps1:235 char:45
    $crllastupdate = $ca.basecrl.thisupdate | get-date -Format „dd.MM.yyyy HH:mm“
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    et-date : The input object cannot be bound to any parameters for the command either because the command does not take
    ipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    t C:\Admin\CA-Reporter\New-CAReport.ps1:236 char:45
    $crlnextupdate = $ca.basecrl.nextupdate | get-date -Format „dd.MM.yyyy HH:mm“
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    et-date : The input object cannot be bound to any parameters for the command either because the command does not take
    ipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    t C:\Admin\CA-Reporter\New-CAReport.ps1:242 char:46
    $crllastupdate = $ca.deltacrl.thisupdate | get-date -Format „dd.MM.yyyy HH:mm“
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    et-date : The input object cannot be bound to any parameters for the command either because the command does not take
    ipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    t C:\Admin\CA-Reporter\New-CAReport.ps1:243 char:46
    $crlnextupdate = $ca.deltacrl.nextupdate | get-date -Format „dd.MM.yyyy HH:mm“
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    et-date : The input object cannot be bound to any parameters for the command either because the command does not take
    ipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    t C:\Admin\CA-Reporter\New-CAReport.ps1:242 char:46
    $crllastupdate = $ca.deltacrl.thisupdate | get-date -Format „dd.MM.yyyy HH:mm“
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    et-date : The input object cannot be bound to any parameters for the command either because the command does not take
    ipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    t C:\Admin\CA-Reporter\New-CAReport.ps1:243 char:46
    $crlnextupdate = $ca.deltacrl.nextupdate | get-date -Format „dd.MM.yyyy HH:mm“
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    et-date : The input object cannot be bound to any parameters for the command either because the command does not take
    ipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    t C:\Admin\CA-Reporter\New-CAReport.ps1:242 char:46
    $crllastupdate = $ca.deltacrl.thisupdate | get-date -Format „dd.MM.yyyy HH:mm“
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    et-date : The input object cannot be bound to any parameters for the command either because the command does not take
    ipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    t C:\Admin\CA-Reporter\New-CAReport.ps1:243 char:46
    $crlnextupdate = $ca.deltacrl.nextupdate | get-date -Format „dd.MM.yyyy HH:mm“
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    xception calling „GetSecurityDescriptor“ with „0“ argument(s): „Specified Certification Authority ‚germanwings SubCA‘
    s unavailable.“
    t C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSPKI\Server\Get-CASecurityDescriptor.ps1:13 char:4
    $CA.GetSecurityDescriptor()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ServerUnavailableException

    ew-Object : Exception calling „.ctor“ with „1“ argument(s): „Specified Certification Authority ‚germanwings SubCA‘ is
    navailable.“
    t C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSPKI\Server\Get-CATemplate.ps1:14 char:4
    New-Object PKI.CertificateServices.CATemplate -ArgumentList $CA
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

    Meine Frage wäre:
    Ich sehe im Report nicht alle Zertifikate sondern nur einige. In Certsrv in „Requester Name“ „Domain\Servername$“ eingetragen sind, werden diese Zertifikate in Report angezeigt. Aber einen Domainuser in „Requster Name“ steht, sind diese Zertifikate nicht drin.
    Kann man allen Zertifikate unabhängig von Requester Name anzeigen lassen?

    Vielen Dank & Viele Grüße
    Musti

    Antworten
  5. Hallo Frank,

    das gerade beschriebene Problem hat sich erledigt. Hat nocg gefehlt => PowerShell PKI Module (PSPKI)
    Allerdings erhalte ich nun mehrere andere Fehler, kann ich dies dir zu Überprüfung zusenden?

    Antworten
  6. Hallo Frank,

    ich bin gerade über deine Powershell Scripte gestolpert und du hast genau das was ich suche.
    Leider erhalte ich nachfolgenden Fehler.
    The term ‚get-ca‘ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    kannst Du mir weiterhelfen?

    Danke

    Antworten
  7. Hallo Frank,

    erstmal Vielen Danke für die Arbeit.

    Wie kann ich mit den PowerShell Script nur eine bestimmte CA abfragen. In meiner Umgebung betreibe ich mehrere Sub-CAs und ich möchte nur eine bestimmte abfragen.

    Gruß, Amine

    Antworten
  8. Hallo Frank

    ich kann den Bericht zwar ausführe bekomme aber während der Erstellung folgenden Fehler. Im Log ist aber nichts drin.

    Was kann ich machen um den Fehler zu beseitigen?

    Erstelle CA Report:get-date : The input object cannot be bound to any parameters for the command either because the com
    mand does not take
    pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    At C:\CA-Reporter\CA-Reporter\New-CAReport.ps1:241 char:46
    + $crllastupdate = $ca.deltacrl.thisupdate | get-date -Format „dd.MM.yyyy HH:mm“
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    get-date : The input object cannot be bound to any parameters for the command either because the command does not take
    pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
    At C:\CA-Reporter\CA-Reporter\New-CAReport.ps1:242 char:46
    + $crlnextupdate = $ca.deltacrl.nextupdate | get-date -Format „dd.MM.yyyy HH:mm“
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.PowerShell.Commands.GetDateCommand

    Antworten
  9. Hallo Frank,
    bei mir läuft der Ca Reporter auf folgenden Fehler:
    Erstelle CA Report:New-Object : Exception calling „.ctor“ with „1“ argument(s): „There is no such object on the server.


    At C:\Program Files\Sysadmins LV\PowerShell\Modules\pspki\Server\Get-CATemplate.ps1:14 char:4
    + New-Object PKI.CertificateServices.CATemplate -ArgumentList $CA
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

    Finde leider den Fehler nicht.

    Gruß
    Markus

    Antworten
    • Hallo Markus,

      kannst du mal die PSPKI neuinstallieren? Bitte darauf achten das beim Setup „Für alle Benutzer“ ausgewählt ist. Danach prüfe bitte ob dir das CMDlet „get-ca“ eine CA anzeigt.

      Gruß, Frank

      Antworten
  10. Hallo Frank,

    danke für die Arbeit für diese Exchange Report Funktionen. Ich habe CA-Reporter installiert. Die Aufgabe läuft auch ab, aber ich bekomme keine Email mit dem Bericht. Gibt es ein Protokoll wo ich sehen kann was falsch läuft? In Ereignisprotokollen etc. ist auch kein Fehler zu finden.

    Danke für die Antwort

    Antworten
    • Hallo Thomas,
      ich kann mir das gerne anschauen. Ändere doch bitte die folgende Werte in der Settings.ini:
      CleanTMPFolder=nein
      WriteErrorLog=ja
      dann rufe den Report über die PowerShell auf: .\new-careport.ps1 -installpath „Pfad zur Installation“
      Mach bitte einen Screenshot von der Ausgabe und speichere den Screenshot im Installationsverzeichnis. Das Verzeichnis kannst du dann packen und mir zuschicken (webmaster@frankysweb.de).

      Gruss,

      Frank

      Antworten

Schreibe einen Kommentar