PowerShell commands to uninstall rapi7 insight from Virutual machine and install NVM from PowerShell

Varma 1,275 Reputation points
2024-02-11T05:12:36.3533333+00:00

YOu can see below i have rapid 7 installed , I want to uninstall it through PowerShell could you please suggest User's image

and I want to download and install NVM through PowerShell , I have done it locally as below and hope this correct? User's image

Both uninstall of rapi7 agent and install of NVM , would like to use PowerShell command so that I can execute in target machine. Please assist on this, thank you.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,585 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 13,801 Reputation points
    2024-02-11T09:50:04.7366667+00:00

    Hi Varma,

    Thanks for reaching out to Microsoft Q&A.

    To uninstall using powershell:

    1.     Using the Get-WmiObject Method

     use the following command (replace "ProgramName" with the actual program name):  

    Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "ProgramName" } | ForEach-Object { $_.Uninstall() }
    
    

      2.     Using the Uninstall-Package Command:

    • This method is useful for hidden or unknown programs.
    • To directly remove a target program, open PowerShell and run:
    Get-AppxPackage *ProgramName* | Remove-AppxPackage
    

      To Download and Install NVM via PowerShell:

    1. NVM is not directly available for Windows, but we can use its Windows counterpart called “nvm-windows.”
    2. Follow these steps:
    • Step 1: Head over to the nvm-windows repository.
    • Step 2: Click on “Download Now!” to get the latest version
    • Step 3: Locate the installer on your computer and run it. Follow the installation wizard.
      • Step 4: Open PowerShell or Command Prompt and run:
    nvm -v
    

    Remember to restart your PC after uninstalling

    Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.