
<server2022只能安装dotnet4.8
KB4486129 Server2016
KB4486153 Server2019$client111 = new-object System.Net.WebClient
$client111.DownloadFile('http://download.visualstudio.microsoft.com/download/pr/2d6bb6b2-226a-4baa-bdec-798822606ff1/9b7b8746971ed51a1770ae4293618187/ndp48-web.exe','c:\ndp48-web.exe')
cmd.exe /c C:\ndp48-web.exe /q /log %temp%\SP123.html /norestart≥server2022才可以安装dotnet4.8.1
KB5011048 Server2022$client111 = new-object System.Net.WebClient
$client111.DownloadFile('http://download.microsoft.com/download/4/b/2/cd00d4ed-ebdd-49ee-8a33-eabc3d1030e3/NDP481-Web.exe','c:\NDP481-Web.exe')
cmd.exe /c C:\NDP481-Web.exe /q /log %temp%\SP123.html /norestart安装完成后重启机器生效
安装完成后重启机器生效
安装完成后重启机器生效
然后可以安装检查dotnet版本号的命令行工具
(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full").Release
[System.Net.ServicePointManager]::SecurityProtocol.HasFlag([Net.SecurityProtocolType]::Tls12)
if(([System.Net.ServicePointManager]::SecurityProtocol.HasFlag([Net.SecurityProtocolType]::Tls12)) -eq $false){
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12
}
[System.Net.ServicePointManager]::SecurityProtocol.HasFlag([Net.SecurityProtocolType]::Tls12)
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module -Name DotNetVersionLister -Scope CurrentUser -Force
Get-STDotNetVersion -NoSummaryserver2019

server2022

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。