New-CertificateNotificationTask

업데이트 날짜: 2015년 9월

New-CertificateNotificationTask

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

구문

Parameter Set: Default
New-CertificateNotificationTask -Channel <NotificationChannel> {System | User} -Name <String> -PSScript <String> -Type <CertificateNotificationType> {Replace | Expire} [-RunTaskForExistingCertificates] [-Confirm] [-WhatIf] [ <CommonParameters>]




자세한 설명

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

If the RunTaskForExistingCertificates parameter is specified, then after this cmdlet is registered, the cmdlet will go through all certificates (including archived certificates) in the My store and initiate Replace events for all certificates with a Renewal property. The NewCertHash value will always be the one at the end of the renewal chain. For 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 certificates are properly updated to the newest certificates. If any certificate has a renewal chain longer than 20, then the certificate is not logged.

매개 변수

-Channel<NotificationChannel>

Sets the channel of the CertificateServicesClient-Notifications log that will be monitored for certificate lifecycle events. 이 매개 변수에 허용되는 값은 다음과 같습니다.
-- System: The Operation-System channel will be used. This channel should be used to modify system certificate bindings that use computer certificates.
-- User: The Operational-User channel will be used. This channel should be used to modify user certificate bindings.


별칭

none

필수 여부

true

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Name<String>

Specifies the unique name for the certificate notification task. If a certificate notification task with the same name already exists, then an error is generated.


별칭

none

필수 여부

true

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-PSScript<String>

Identifies the Windows PowerShell® script that will be triggered by the certificate notification task. The script will be launched with the NonInteractive parameter.


별칭

none

필수 여부

true

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-RunTaskForExistingCertificates

Generates a replacement notification for any certificate in the My store that has been replaced in the past. For the notification to be generated both certificates must be present in the store. This parameter can only be used with the Replace type.
Note: The following warning will be displayed when this cmdlet is run with this parameter set to False and there are some certificates in MY store that would have resulted in a notification.
-- There are certificates in My store that have been replaced in the past. You can use the New-CertificateNotification cmdlet with the RunTaskForExistingCerts parameter to generate notifications for those certificates to correct any configuration problems that you may already have on this machine.


별칭

none

필수 여부

false

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Type<CertificateNotificationType>

Specifies the type of events that will trigger certificate notifications. 이 매개 변수에 허용되는 값은 다음과 같습니다.
-- Replace: Certificate replacement events will trigger this notification, including certificates that are renewed by auto-enrollment, using the Certificates snap-in, or by using the Switch-Certificate cmdlet.
-- Expire: Certificate expiration and close-to-expire events will trigger this notification.


별칭

none

필수 여부

true

위치

named

기본값

none

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-Confirm

cmdlet을 실행하기 전에 확인 메시지를 표시합니다.


필수 여부

false

위치

named

기본값

false

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

-WhatIf

cmdlet이 실행되는 경우 발생할 결과를 보여 줍니다. cmdlet은 실행되지 않습니다.


필수 여부

false

위치

named

기본값

false

파이프라인 입력 허용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable 등의 일반 매개 변수를 지원합니다. 자세한 내용은 TechNet의 about_CommonParameters(http://go.microsoft.com/fwlink/p/?LinkID=113216)

입력

입력 형식은 cmdlet으로 파이프할 수 있는 개체의 형식입니다.

  • None

출력

출력 형식은 cmdlet 실행 시 출력되는 개체의 형식입니다.

  • Microsoft.CertificateServices.Command.CertificateNotificationTask

    A CertificateNotificationTask object that contains details about a newly created task.


EXAMPLE 1

This example creates a system notification task for certificate replacement events with the name My System Certificate Task that will launch the myscript.ps1 script located on the C: drive. The cmdlet will run on the local system.


PS C:\> New-CertificateNotificationTask -PSScript C:\myscript.ps1 -Channel System -Type Replace -Name "My System Certificate Task"

EXAMPLE 2

This example creates a system notification task for the expiration and close-to-expiration certificate events with the name My User Certificate Task that will launch the myscript.ps1 script located on the C: drive. The cmdlet will run for all currently logged on users in the user contexts.


PS C:\> New-CertificateNotificationTask -PSScript C:\myscript.ps1 -Channel User -Type Expire -Name "My User Certificate Task"

관련 항목

표시: