New-MgmtSvcSelfSignedCertificate

Creates a self-signed certificate.

Syntax

New-MgmtSvcSelfSignedCertificate [-Password <SecureString>] -StoreLocation <StoreLocation>
 -StoreName <StoreName> -Subject <String> [<CommonParameters>]

Description

The New-MgmtSvcSelfSignedCertificate cmdlet creates a self-signed certificate.

Examples

1:

PS C:\> $Password = ConvertTo-SecureString "PassWord01!" -AsPlainText -Force
PS C:\> New-MgmtSvcSelfSignedCertificate -StoreLocation "LocalMachine" -StoreName "Root" -Subject "CN=Admin,DC=Contoso,DC=com" -Password $Password

Parameters

-Password

Specifies a password as a secure string object.

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

-StoreLocation

Specifies the store location for the certificate.
Valid values for this parameter are:

- CurrentUser
- LocalMachine

Type:StoreLocation
Parameter Sets:CurrentUser, LocalMachine
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-StoreName

Specifies the store name for the certificate.
Valid values for this parameter are:

- AddressBook
- AuthRoot
- CertificateAuthority
- Disallowed
- My
- Root
- TrustedPeople
- TrustedPublisher

Type:StoreName
Parameter Sets:AddressBook, AuthRoot, CertificateAuthority, Disallowed, My, Root, TrustedPeople, TrustedPublisher
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Subject

Specifies a subject for the certificate.

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