-
Notifications
You must be signed in to change notification settings - Fork 1
Grant CertificateAccess
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
Gives a user or an IIS app pool access to a certificate's private key.
Grant-CertificateAccess [-UserName] <String> [-Certificate] <X509Certificate2>
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
Grant-CertificateAccess -AppPool <String> [-Certificate] <X509Certificate2>
[-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
This will explicitly allow access to a certificate's private key file.
PS C:\> Grant-CertificateAccess -AppPool ExampleAppPool -Certificate $cert
Allows the ExampleAppPool app pool access to read the cert in $cert.
PS C:\> Find-Certificate -FindValue ExampleCert -FindType FindBySubjectName -StoreName TrustedPeople -StoreLocation LocalMachine |Grant-CertificateAccess ExampleAppPool
Allows the ExampleAppPool app pool access to read the found ExampleCert.
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: FalseA 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: FalsePrompts 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: FalseA Windows domain account.
Type: String
Parameter Sets: UserName
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows 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{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
.net - winhttpcertcfg giving access to IIS user in Windows 7 - Stack Overflow