Error installed AD CS using "RSA#Microsoft Enhanced RSA and AES Cryptographic Storage Provider"

Charlie Melga 126 Reputation points
2023-03-13T13:05:54.5466667+00:00

Hello

If I installed AD CS as follows (on Windows 2019 Server Core)

Install-AdcsCertificationAuthority –CAType EnterpriseSubordinateCA –CACommonName "Core-CA-02" `

–KeyLength 2048 –HashAlgorithmName SHA256 `

–CryptoProviderName "RSA#Microsoft Software Key Storage Provider"

The above works no problem

If I change the –CryptoProviderName to the following

–CryptoProviderName 'RSA#Microsoft Enhanced RSA and AES Cryptographic Storage Provider'

It fails to install
(I can use the 'Microsoft Enhanced RSA and AES Cryptographic Storage Provider' via a GUI install with no issues, this this is Windows Server Core so no GUI). So I know it is not the CryptoProviderName (unless the syntax is slightly wrong as you have to add RSA# to the beginning of the name.

I do not have the exact error message to hand at the moment (apologies), but it is something along the lines of

Incorrect parameter, or unrecognized parameter

Any ideas please?

thanks in advance

CXMelga

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Server | Devices and deployment | Configure application groups
{count} votes

Accepted answer
  1. Vadims Podāns 9,186 Reputation points MVP
    2023-03-13T14:55:30.15+00:00

    Actual provider name is "Microsoft Enhanced RSA and AES Cryptographic Provider" without "RSA#" prefix. The reason behind "RSA#" prefix is that Microsoft KSP support different types of asymmetric algorithms such as RSA, ECDSA (with different curves). "Microsoft Enhanced RSA and AES Cryptographic Provider" supports only RSA, so prefix is redundant.

    Note: "Microsoft Enhanced RSA and AES Cryptographic Provider" provider use for CA is strongly discouraged, because it is a legacy provider which doesn't support enhanced features provided by CNG subsystem and may get limited set of supported algorithms.


1 additional answer

Sort by: Most helpful
  1. Thameur-BOURBITA 36,261 Reputation points Moderator
    2023-03-13T14:27:07.7066667+00:00

    Hi @Charlie Melga

    It seems that the syntax is not correct :

    Did your try use –CryptoProviderNam Microsoft Enhanced RSA and AES Cryptographic Provider ?

    Please don't forget to mark helpful answer as accepted

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.