Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Add-CertificateEnrollmentPolicyServer

Add-CertificateEnrollmentPolicyServer

microsoft.certificateservices.pkiclient.cmdlets.dll

Synopsis

Adds an enrollment policy server to the current user or local system configuration.

Syntax

Add-CertificateEnrollmentPolicyServer [-AutoEnrollmentEnabled] [-Credential] [-NoClobber] [-RequireStrongValidation] [-context] [-Url] [<CommonParameters>]

Detailed Description

The Add-CertificateEnrollmentPolicyServer cmdlet adds an enrollment policy server to the current user or local system configuration. If an enrollment policy server already exists, then this cmdlet will overwrite it. Group Policy can be configured to prevent enrollment policy servers from being added.

Delegation may be required when using this cmdlet with Windows PowerShell® remoting and changing user configuration.

Parameters

-AutoEnrollmentEnabled <SwitchParameter>

Enables auto-enrollment for the policy server being added.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-context <Context>

Stores information about the policy server in the configuration for the Current User or Local computer.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Credential <PkiCredential>

Specifies the credential used to authenticate to the policy server. This credential can be a PSCredential object, which is a username and password, an x509 certificate, or a path to an x509 certificate. Kerberos authentication is used if no credential is specified.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-NoClobber <SwitchParameter>

Prevents an enrollment policy server from overwriting an existing one.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-RequireStrongValidation <SwitchParameter>

Specifies that the certificate obtained through this enrollment policy server must be trusted on the client.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Url <Uri>

Identifies the uniform resource locator (URL) of the enrollment policy server to configure.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByValue, ByPropertyName)

Accept wildcard characters?

false

Input Type

Microsoft.CertificateServices.Commands.EnrollmentPolicyServer

Return Type

Microsoft.CertificateServices.Commands.EnrollmentPolicyServer

Notes

None

Examples

EXAMPLE 1

This example loads a policy from $url using Windows integrated authentication under the computer context, using the computer account credentials. This example also adds the policy server to the local computer configuration. Auto enrollment is off and strong validation is off.

PS C:\>Add-CertificateEnrollmentPolicyServer -Url $url -Context Machine

EXAMPLE 2

This example loads a policy using $cert as the authentication credential and adds the policy to the local computer local configuration since the context is the local computer (Machine).

PS C:\>$cert = ( Get-ChildItem -Path cert:\LocalMachine\My\EEDEF61D4FF6EDBAAD538BB08CCAADDC3EE28FF )



PS C:\>Add-CertificateEnrollmentPolicyServer -Url $cert.EnrollmentPolicyEndPoint.Url -Credential $cert -Context Machine

EXAMPLE 3

This example loads a policy using the username and password from $url. This example adds the policy server to the local computer configuration.

PS C:\>$up = Get-Credential



PS C:\>Add-CertificateEnrollmentPolicyServer -Url $url -Context Machine -Credential $up

EXAMPLE 4

This example loads policy using the Path object for a certificate. Use the certificate to authenticate to the URL and add the policy server into the local user configuration.

PS C:\>$cert = (Get-ChildItem -Path cert:\CurrentUser\My\EEDEF61D4FF6EDBAAD538BB08CCAADDC3EE28FF)



PS C:\>Add-CertificateEnrollmentPolicyServer -Url $cert.EnrollmentPolicyEndPoint.Url -Credential $cert.PSPath -Context Machine

EXAMPLE 5

This example shows that if the policy cannot be loaded or if there is a conflict with an identifier (ID) or URL, then this will be the output. If the policy server already exists, then the output will state that the existing policy server configuration will be overwritten.

PS C:\>$up = Get-Credential



PS C:\>Add-CertificateEnrollmentPolicyServer -Url $url -Context User -Credential $up –WhatIf
What if: Policy successfully loaded from {$url} using username/password credentials. 
Policy server configuration will be added to current user context. 

Online Version
Get-ChildItem
Get-Credential
Get-CertificateEnrollmentPolicyServer
Remove-CertificateEnrollmentPolicyServer