SetCertificatDomainValidation - RIT-ITS/CertifiCat-PS GitHub Wiki
Allows a user to specify the regular expression pattern that is used when validating domains that are specified as part of the Initialize-NewACMECertificate function.
Set-CertifiCatDomainValidation [-domainPattern <String>]
[-debugEnabled] [-debugLogDirectory <string>] [-debugMode <string>]
The CertifiCat-PS module allows users to overwrite the default value of all variables through the use of Environmental Variables. The most common one that will likely need to be set by users outside of RIT is the CERTIFICAT_VALIDATE_PATTERN_DOMAIN_NAME variable, which controls the domain validation pattern.
This function allows a user to quickly and easily set and update the environmental variable used to control this pattern.
Set-CertifiCatDomainValidation -domainPattern "(.)*.example.com"
This command will create the CERTIFICAT_VALIDATE_PATTERN_DOMAIN_NAME environmental variable with a value "(.)*.example.com".
Specifies regular expression pattern that should be used when validating domains in a SAN list.
Type: String
Position: Named / 1
Default Value: None
Required: True
This switch must be present to cause the function in question to output the contents of the object to a file or event log
Type: Switch
Position: Named
Required: False
Specifies where the CertifiCat-PS debug logs are written, when the debugMode option is EVT or Both.
Type: String
Position: Named
Required: False
Controls where the CertifiCat-PS debug informaiton is written: EVT (the windows event log), File (a text file on disk), or Both (a text file on disk and the Windows Event Log)
Type: String
Position: Named
Required: False
Default Value: EVT
ValidateSet: EVT, File, Both
Returns a custom PowerShell object with properties about the function and the account that was set up. The object has the following properties:
Property | Details |
---|---|
FunctionName | Name of the function that was run |
RunningPSVersion | The version of the PowerShell console used to run the function |
PS5Command | A full string containing the commands needed to run the same command in PowerShell 5 |
FunctionArguments | A list of the arguments passed to the function |
FunctionSuccess | True/False indicating if the function succeeded. When false, this typically indicates a larger issue (e.g. no admin rights, etc) |
Errors | A string containing details about any errors that were encountered |
domainPattern | The regular expression pattern that was used as the value of the environmental variable |
debugEnabled | Boolean indicating whether debug logging was enabled |
debugLogDirectory | String indicating the location of the debug log file, if file logging mode is enabled |
debugMode | String indicating the logging mode (i.e. EVT, File, or Both) |