-
Notifications
You must be signed in to change notification settings - Fork 9
Find Certificate
Locates one or more certificates using the passed certificate selector parameters.
Find-Certificate [[-Thumbprint] <String>] [[-FriendlyName] <String>] [[-Subject] <String>]
[[-DNSName] <String[]>] [[-Issuer] <String>] [[-KeyUsage] <String[]>] [[-EnhancedKeyUsage] <String[]>]
[[-Store] <String>] [[-AllowExpired] <Boolean>] [<CommonParameters>]
A common function to find certificates based on multiple search filters, including, but not limited to: Thumbprint, Friendly Name, DNS Names, Key Usage, Issuers, etc.
Locates one or more certificates using the passed certificate selector parameters. If more than one certificate is found matching the selector criteria, they will be returned in order of descending expiration date.
Find-Certificate -Thumbprint '1111111111111111111111111111111111111111'
Return certificate that matches thumbprint.
Find-Certificate -KeyUsage 'DataEncipherment', 'DigitalSignature'
Return certificate(s) that have specific key usage.
Find-Certificate -DNSName 'www.fabrikam.com', 'www.contoso.com'
Return certificate(s) filtered on specific DNS Names.
Find-Certificate -Subject 'CN=contoso, DC=com'
Return certificate(s) with specific subject.
Find-Certificate -Issuer 'CN=contoso-ca, DC=com' -AllowExpired $true
Return all certificates from specific issuer, including expired certificates.
Find-Certificate -EnhancedKeyUsage @('Client authentication','Server Authentication') -AllowExpired $true
Return all certificates that can be used for server or client authentication, including expired certificates.
Find-Certificate -FriendlyName 'My IIS Site SSL Cert'
Return certificate based on FriendlyName.
Allows expired certificates to be returned.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The subject alternative name of the certificate to export must contain these values.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The enhanced key usage of the certificate to find must contain these values.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The friendly name of the certificate to find.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The issuer of the certificate to find.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The key usage of the certificate to find must contain these values.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The Windows Certificate Store Name to search for the certificate in. Defaults to 'My'.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value: My
Accept pipeline input: False
Accept wildcard characters: False
The subject of the certificate to find.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The thumbprint of the certificate to find.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
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.
- Assert-BoundParameter
- Assert-ElevatedUser
- Assert-IPAddress
- Assert-Module
- Compare-DscParameterState
- Compare-ResourcePropertyState
- ConvertFrom-DscResourceInstance
- ConvertTo-CimInstance
- ConvertTo-HashTable
- Find-Certificate
- Get-ComputerName
- Get-DscProperty
- Get-EnvironmentVariable
- Get-LocalizedData
- Get-LocalizedDataForInvariantCulture
- Get-PSModulePath
- Get-TemporaryFolder
- Get-UserName
- New-ArgumentException
- New-ErrorRecord
- New-Exception
- New-InvalidDataException
- New-InvalidOperationException
- New-InvalidResultException
- New-NotImplementedException
- New-ObjectNotFoundException
- Remove-CommonParameter
- Set-DscMachineRebootRequired
- Set-PSModulePath
- Test-AccountRequirePassword
- Test-DscParameterState
- Test-DscProperty
- Test-IsNanoServer
- Test-IsNumericType
- Test-ModuleExist