SecTeer VulnDetect & PatchPro Support Forum VulnDetect
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Download VulnDetect Installer
    • Login

    dotnet-core-uninstall Tool

    Scheduled Pinned Locked Moved [Corporate] Deployment -> Custom Software
    1 Posts 1 Posters 414 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      amu
      last edited by Tom

      The Microsoft .NET family is released in parallel channels by Microsoft. This means that one major version can coexist with another and that installing e.g. 6.x doesn't replace 5.x.

      Microsoft .NET uninstall tool, this can be used to manage .NET installations, however, care must be taken, as it can remove more versions than intended. Fortunately, redeploying .NET is easy, as we also support installing it as a deployment job:
      ef356a4e-d068-4b31-b207-5fedc94939d9-image.png

      You will need to deploy the Microsoft .NET uninstall tool on each host where you want to handle the various .NET versions.
      Once you have the uninstall tool installed on the hosts, you can use Custom Software to create a custom job for the uninstall tool, where you will attach a .ps1 script as the Installer, which contains the following:

      Start-Process -FilePath "C:\Program Files (x86)\dotnet-core-uninstall\dotnet-core-uninstall.exe" -ArgumentList "remove --all-but-latest --runtime --yes" -WorkingDirectory "C:\Program Files (x86)\dotnet-core-uninstall"
      

      The above example should remove all RUNTIME versions except for the latest version (--all-but-latest --runtime).

      You may also use the option --all-below <VERSION>[ <VERSION>...] , however we recommend that you consult the official documentation which contains the full options list:
      https://learn.microsoft.com/en-us/dotnet/core/additional-tools/uninstall-tool?tabs=windows#list-command

      Example of Custom Software:
      fdec2ec5-b846-49d3-ba2a-e19a479b2d18-image.png

      1 Reply Last reply Reply Quote 0
      • T Tom moved this topic from [Custom Software guide drafts] on
      • First post
        Last post
      Download SecTeer Personal VulnDetect - an alternative to the long lost Secunia PSI

      Please see our Privacy and Data Processing Policy
      Sponsored and operated by SecTeer | VulnDetect is a replacement for the EoL Secunia PSI
      Forum software by NodeBB