New-MgmtSvcSelfSignedCertificate
Creates a self-signed certificate.
Syntax
New-MgmtSvcSelfSignedCertificate
-Subject <String>
-StoreLocation <StoreLocation>
-StoreName <StoreName>
[-Password <SecureString>]
[<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 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Accepted values: | CurrentUser, LocalMachine |
Position: | Named |
Default value: | None |
Required: | True |
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 |
Accepted values: | AddressBook, AuthRoot, CertificateAuthority, Disallowed, My, Root, TrustedPeople, TrustedPublisher |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Subject
Specifies a subject for the certificate.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |