The Set-CrmCertificate cmdlet creates a certificate record or sets the properties of an existing certificate record in the Microsoft Dynamics 365 configuration database.
Imports the specified certificate into the Dynamics 365 deployment.
Parameters
-Certificate
Specifies a fully constructed certificate, created using Microsoft.Xrm.Sdk.Deployment.Certificate. This allows you to create a script to fully construct your certificate and pass it to the Set-CrmCertificate command with a single parameter.
Parameter properties
Type:
Certificate
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
CertificateOnly
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-CertificateType
Specifies the type of certificate to set. Currently AppFabricIssuer, TrustedIssuer, and RelyingPartyEncrypting are supported.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
WithoutStoreProperty
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
WithStoreProperty
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-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
-Credential
Expects a variable that contains the user credentials used for signing in to Dynamics 365 on-premises organization. To establish this variable, run the PowerShell command $Cred = Get-Credential.
Parameter properties
Type:
PSCredential
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-DataFile
Specifies the path to the x509 certificate. This path is used to load the certificate from a local file. This is generally a file with the .pfx extension.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
WithoutStoreProperty
Position:
3
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
WithStoreProperty
Position:
3
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Diag
Turns on stack traces for error reports returned from Dynamics 365 service calls. Enabling this emits a detailed error message, including a stack trace, when an error is encountered by the Dynamics 365 PowerShell command.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DwsServerUrl
The URL of the Deployment Web Service. This should be in the format: https://<serverurl>, for example, https://contoso.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Name
Specifies the IssuerName of the certificate being set.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
WithoutStoreProperty
Position:
1
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
WithStoreProperty
Position:
1
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-StoreFindType
Determines how the certificate should be located in the store. Currently FindBySubjectDistinguishedName is supported.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
WithStoreProperty
Position:
5
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-StoreLocation
Specifies the location to store this certificate. This will be either CurrentUser or LocalMachine.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
WithStoreProperty
Position:
4
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-StoreName
Specifies the name of the certificate store to store this certificate in. In general, this will be one of the following: AddressBook, CertificateAuthority, Disallowed, My, Root, TrustedPeople, or TrustedPublisher.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
WithStoreProperty
Position:
3
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Timeout
For internal use only.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
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.