Contact Info

Crumbtrail » Administration » Powershell » Powershell 3.0 » New-CertificateNotificationTask

New-CertificateNotificationTask - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


Short description
Creates a new task in the Task Scheduler that will be triggered when a certificate is replaced, expired, or about to expired.

New-CertificateNotificationTask [-RunTaskForExistingCertificates [<SwitchParameter>]] -Channel <NotificationChannel> -N
ame <String> -PSScript <String> -Type <CertificateNotificationType> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchPar
ameter>]] [<CommonParameters>]

The New-CertificateNotificationTask cmdlet creates a new task in the Task Scheduler that will be triggered when a certi
ficate is replaced or expires. The task will launch the script specified by the PSScript parameter.

If RunTaskForExistingCertificates is specified, then after this cmdlet is registered, the cmdlet will go through all ce
rtificates (including archived certificates) in the My store and initiate Replace events for all certificates with a Re
newal property. The NewCertHash value will always be the one at the end of the renewal chain. Example: If certificate A
 was renewed to certificate B, which was then renewed to certificate C, then the cmdlet fires two events: certificate A
 to certificate C and certificate B to certificate C. This will ensure that applications that are still using old certi
ficates are properly updated to the newest certificates. If any certificate has a renewal chain longer than 20, then th
e certificate is not logged.