普通命令行

reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP" /s

PowerShell

Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse | Get-ItemProperty -Name version -EA 0 | Where { $_.PSChildName -Match '^(?!S)\p{L}'} | Select PSChildName, version