[smartmontools-support] Issue with drivedb.h PowerShell update script on windows
Christian Franke
Christian.Franke at t-online.de
Wed Jan 21 12:59:23 CET 2026
Hello,
Andrew D. via Smartmontools-support wrote:
> I met some issues with update script and finally get them fixed.
> Source of issue is that at least on Windows 7 / Powershell 5.1 it tries to use old sequrity protocols by default that is disabled.
Thanks for reporting this.
>
> Solution is simple - put one of this lines before processing to download:
> [Net.ServicePointManager]::SecurityProtocol = "Tls12, Tls11, Tls, Ssl3"
> or just
> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Sorry, no. This disables TLS 1.3 on Windows 11.
Feel free to suggest an alternative solution as a pull request or issue at:
https://github.com/smartmontools/smartmontools
Unfortunately the following would not work:
[Net.ServicePointManager]::SecurityProtocol = `
[Net.ServicePointManager]::SecurityProtocol `
-bor [Net.SecurityProtocolType]::Tls12
This is because the default of 'SecurityProtocol' does not return the
bitmask of enabled protocols:
PS C:\> [Net.ServicePointManager]::SecurityProtocol
SystemDefault
PS C:\> [int][Net.ServicePointManager]::SecurityProtocol
0
> ...
>
>
> Please update script in future releases to make it work out of the box.
It works out of the box if TLS 1.2 is enabled by default which is the
case since Windows 8. Fixes for Windows 7 (end of life: January 2020)
would only be added if forward compatibility would be preserved.
As a workaround, add the setting to the shortcut, for example (remove
the line ending):
powershell -Command "[Net.ServicePointManager]::SecurityProtocol =
[Net.SecurityProtocolType]::Tls12; .\update-smart-drivedb.ps1; pause"
TLS-1.2 could possibly also be enabled via registry entries and/or group
policies.
--
Regards,
Christian
More information about the Smartmontools-support
mailing list