Enable-MSMQCertificate

Registers a certificate with Active Directory Domain Services.

Syntax

Enable-MSMQCertificate
      -InputObject <X509Certificate2>
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
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.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:X509Certificate2
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters: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.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

X509Certificate2

Outputs

Object