admin管理员组

文章数量:1335840

I am trying to install .NET Framework 4.8.1 using Powershell script in Windows Server 2022 Datacenter. Can I install using Chocolatey (.ps1). Please guide me with Powershell .ps1 script to install .NET Framework 4.8.1 in Windows Server 2022 Datacenter.

Please note manual download of the package/.exe is not allowed in our environment.

I am trying to install .NET Framework 4.8.1 using Powershell script in Windows Server 2022 Datacenter. Can I install using Chocolatey (https://chocolatey./install.ps1). Please guide me with Powershell .ps1 script to install .NET Framework 4.8.1 in Windows Server 2022 Datacenter.

Please note manual download of the package/.exe is not allowed in our environment.

Share Improve this question edited Nov 20, 2024 at 6:04 Izzy asked Nov 20, 2024 at 2:40 IzzyIzzy 271 silver badge5 bronze badges 2
  • The dotnetfx package has 4.8.1 available, but it's currently marked as a prerelease (community.chocolatey./packages/dotnetfx/4.8.1.0-rtw). You can install it in a PowerShell script with choco install dotnetfx --pre. That said, this question isn't fantastic for this SO site. – James Ruskin Commented Nov 20, 2024 at 10:20
  • winget install Microsoft.DotNet.Framework.DeveloperPack_4 --version 4.8.1, but note that this involves downloading an offline installer and executing it locally behind the scenes. – mklement0 Commented Nov 20, 2024 at 12:40
Add a comment  | 

1 Answer 1

Reset to default 0

https://dotnet.microsoft/en-us/download/dotnet-framework/thank-you/net481-offline-installer you can download and install with paramerts:

NDP481-x86-x64-AllOS-ENU.exe   /q /norestart 

The parameters can be found out

NDP481-x86-x64-AllOS-ENU.exe /?

powershell

start-Process -ArgumentList "/q /norestart" -NoNewWindow -wait NDP481-x86-x64-AllOS-ENU.exe

you can download and install the program from the SMB network directory, but you should remember that you may need to reboot

本文标签: Install NET Framework 481 using Powershell script in Windows Server 2022 DCStack Overflow