Edit

Share via


Enable-MsmqCertificate

Registers a certificate with Active Directory Domain Services.

Syntax

InputObject

Enable-MsmqCertificate
    -InputObject <X509Certificate2>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

RenewInternalCertificate

Enable-MsmqCertificate
    [-RenewInternalCertificate]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Enable-MsmqCertificate cmdlet registers a certificate with Active Directory® Domain Services. If you specify the RenewInternalCertificate parameter, the cmdlet generates a certificate in your personal certificate store and registers the certificate with Active Directory Domain Services. The cmdlet returns a System.Security.Cryptography.X509Certificates.X509Certificate object that represents the enabled certificate.

Examples

Example 1: Register a certificate

PS C:\> $_ | Enable-MsmqCertificate

This command registers a certificate stored in the pipeline object variable. Use this command as part of a script that uses the pipeline. For more information, type Get-Help about_Automatic_Variables.

Example 2: Create and register a certificate

PS C:\> Enable-MsmqCertificate -RenewInternalCertificate

This command generates a certificate in your personal certificate store and registers it with Active Directory Domain Services.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Specifies a certificate object that represents a certificate that this cmdlet registers with Active Directory Domain Services. If you specify the RenewInternalCertificate parameter, you cannot specify this parameter.

Parameter properties

Type:X509Certificate2
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputObject
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-RenewInternalCertificate

Indicates that this cmdlet generates a certificate in the personal certificate store of the user, and registers that certificate with Active Directory Domain Services. If you pass a certificate to this cmdlet by using the pipeline operator, you cannot specify this parameter.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RenewInternalCertificate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

X509Certificate2

Outputs

Object