Test-FasCertificateSigningRequest
SYNOPSIS
Performs a test certificate signing request (CSR).
SYNTAX
Test-FasCertificateSigningRequest -UserPrincipalName <String> -Rule <String> [-CertificateDefinition <String>]
[-CertificateAuthority <String>] [-SecurityContext <String>] [-ReuseCachedTestKey <Boolean>]
[-Address <String>] [-UserName <String>] [-Password <String>] [<CommonParameters>]
<!--NeedCopy-->
DESCRIPTION
This command performs a test CSR. Any resulting certificate is discarded.
Use this test to verify CSRs to the Certificate Authority are working.
The supplied Certificate Definition (if any) defines the certificate template, authorization certificate and policy oids used for the CSR. The supplied Certificate Authority address (if any) must be present in the supplied CertificateDefinition.
If ReuseCachedTestKey is false, a new key-pair is created for the CSR.
If ReuseCachedTestKey is true, the test re-uses a cached key-pair for the CSR in order to avoid the overhead of generating a new key-pair. The cached key-pair is generated on demand per UPN, and is re-used for a maximum of 1 hour, after which a new key-pair is generated.
EXAMPLES
EXAMPLE 1
PS C:\>
C:\PS> $CitrixFasAddress=(Get-FasServer)[0].Address
C:\PS> Test-FasCertificateSigningRequest -UserPrincipalName "fred@citrixtest.net" -Rule Default
<!--NeedCopy-->
Description
This code performs a test CSR.
PARAMETERS
-UserPrincipalName
Specify the UPN of the user for whom this certificate is being generated.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: (required)
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
-Rule
Specify the Rule name to use when generating the CSR.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: (required)
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
-CertificateDefinition
Specify the Certificate Definition to use when generating the CSR. If not supplied, the first Certificate Definition of the Rule is used.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (the first certificate definition in the given rule)
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
-CertificateAuthority
Specify the address of Certificate Authority to send the CSR to. If not supplied, the first Certificate Authority of the Certificate Definition is used.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: (the first certificate authority of the certificate definition)
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
-SecurityContext
Specify the Security Context to use when generating the certificate.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $NULL
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
-ReuseCachedTestKey
Specify whether to re-use a test key-pair in the CSR.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $False
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
-Address
Address of FAS Server (or $NULL to use $CitrixFasAddress).
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $CitrixFasAddress
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
-UserName
User name to use for authentication to FAS server ($NULL for current user account).
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $NULL
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
-Password
Password for authentication to FAS server ($NULL for current user account).
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $NULL
Accept pipeline input: False
Accept wildcard characters: False
<!--NeedCopy-->
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
Variable, based on property name.
This cmdlet does accept input from the pipeline but only by property name.
OUTPUTS
DiagnosticTestResult
This cmdlet returns a DiagnosticTestResult object