I'm wondering if anyone knows of a way to query if "Force encryption" is set to true for SQL Server.
I know I can check sys.dm_exec_connections
to see if the current connections are encrypted, but that doesn't really get me what I want. All the connections could still be encrypted even with "Force encryption" set to false
if the client requests encryption.
I'm building a report that scans all our SQL servers in our environment to test against our best practice settings so that we can fixed mis-configured systems. Since the report will be run on a schedule, relying on sys.dm_exec_connections
could get me a false sense of security, as all the connection could be encrypted when the report was run, but five seconds later something connects unencrypted. Our goal is to try and get all our SQL servers to force encryption and then be able to report on abnormalities.