Initialize D365RsatCertificate - FH-Inway/d365fo.tools GitHub Wiki
Create and configure test automation certificate
Initialize-D365RsatCertificate [-CertificateFileName <String>] [-PrivateKeyFileName <String>]
[-Password <SecureString>] [-CertificateOnly] [-KeepCertificateFile] [-OutputPath <String>]
[<CommonParameters>]
Creates a new self signed certificate for automated testing and reconfigures the AOS Windows Identity Foundation configuration to trust the certificate
Initialize-D365RsatCertificate
This will generate a certificate for issuer 127.0.0.1 and install it in the trusted root certificates and modify the wif.config of the AOS to include the thumbprint and trust the certificate.
Initialize-D365RsatCertificate -CertificateOnly
This will generate a certificate for issuer 127.0.0.1 and install it in the trusted root certificates. No actions will be taken regarding modifying the AOS wif.config file.
Use this when installing RSAT on a machine different from the AOS where RSAT is pointing to.
Initialize-D365RsatCertificate -CertificateOnly -KeepCertificateFile
This will generate a certificate for issuer 127.0.0.1 and install it in the trusted root certificates. No actions will be taken regarding modifying the AOS wif.config file. The pfx will be copied into the default "c:\temp\d365fo.tools" folder after creation.
Use this when installing RSAT on a machine different from the AOS where RSAT is pointing to.
The pfx file enables you to import the same certificate across your entire network, instead of creating one per machine.
Filename to be used when exporting the cer file
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Join-Path $env:TEMP "TestAuthCert.cer")
Accept pipeline input: False
Accept wildcard characters: False
Filename to be used when exporting the pfx file
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (Join-Path $env:TEMP "TestAuthCert.pfx")
Accept pipeline input: False
Accept wildcard characters: False
The password that you want to use to protect your certificate with
The default value is: "Password1"
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (ConvertTo-SecureString -String "Password1" -Force -AsPlainText)
Accept pipeline input: False
Accept wildcard characters: False
Switch specifying if only the certificate needs to be created
If specified, then only the certificate is created and the thumbprint is not added to the wif.config on the AOS side If not specified (default) then the certificate is created and installed and the corresponding thumbprint is added to the wif.config on the local machine
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Instruct the cmdlet to copy the certificate file from the working directory into the desired location specified with OutputPath parameter
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Path to where you want the certificate file exported to, when using the KeepCertificateFile parameter switch
Default value is: "c:\temp\d365fo.tools"
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $Script:DefaultTempPath
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Tags: Automated Test, Test, Regression, Certificate, Thumbprint
Author: Kenny Saelen (@kennysaelen)
Author: Mötz Jensen (@Splaxi)