Enable-Msmq
Certificate
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.
Required Parameters
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 |
Accept pipeline input: | True (ByValue) |
Accept wildcard characters: | False |
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 |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Optional Parameters
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |