Skip to content

Unblock CertificateAccess

github-actions edited this page Jul 20, 2026 · 1 revision

external help file: CertAdmin.dll-Help.xml Module Name: CertAdmin online version: https://msdn.microsoft.com/library/system.security.cryptography.x509certificates.x509findtype.aspx schema: 2.0.0

Unblock-CertificateAccess

SYNOPSIS

Rescinds a denied user or an IIS app pool access to a certificate's private key.

SYNTAX

UserName

Unblock-CertificateAccess [-UserName] <String> [-Certificate] <X509Certificate2>
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

AppPool

Unblock-CertificateAccess -AppPool <String> [-Certificate] <X509Certificate2>
 [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

This will rescind denied access to a certificate's private key file.

EXAMPLES

Example 1

PS C:\> Unblock-CertificateAccess -AppPool ExampleAppPool -Certificate $cert

Revokes the denied ExampleAppPool app pool access to read the cert in $cert.

Example 2

PS C:\> Find-Certificate -FindValue ExampleCert -FindType FindBySubjectName -StoreName TrustedPeople -StoreLocation LocalMachine |Unblock-CertificateAccess ExampleAppPool

Revokes the denied ExampleAppPool app pool access to read the found ExampleCert.

PARAMETERS

-AppPool

The name of an IIS app pool.

Type: String
Parameter Sets: AppPool
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Certificate

A certificate from the Windows Certificate Store.

Type: X509Certificate2
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-UserName

A Windows domain account.

Type: String
Parameter Sets: UserName
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

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

System.Security.Cryptography.X509Certificates.X509Certificate2

OUTPUTS

System.Object

NOTES

RELATED LINKS