1

I'm implementing the Always Encrypted feature in SQL Server 2016. I have tried to create the certificate using PowerShell in Windows 10 environment as per the below article.

https://docs.microsoft.com/en-us/sql/relational-databases/security/encryption/create-and-store-column-master-keys-always-encrypted?view=sql-server-2017

However, when I tried to execute the same scripts on Windows Server 2012 R2 environment, script fails and not able to generate the certificate.

Could anyone help me on this?

  • The only reason for using PowerShell script is to create the certificate with more than one-year validity as SSMS creates the certificate with one-year validity by default. – Sri Jul 7 '18 at 2:39
  • 1
    An initial guess is the script is the PowerShell script is only supported on Window Server 2016. The PS command in use in that document has parameters that don't exist in lower OS versions. As well, if you are running SQL Server 2016, you should run it on Window Server 2016. – Shawn Melton Jul 11 '18 at 20:28
  • @Shawn Melton: Thanks for your kind feedback. Yes, this doesn't work on Windows Server 2012 R2. But it works nicely on Windows Server 2016 and Windows 10. – Sri Jul 19 '18 at 0:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.