Uninstall PowerCLI

You can uninstall PowerCLI by running PowerShell commands. You can uninstall all VMware PowerCLI modules, or uninstall modules individually.

Use the Uninstall-Module cmdlet to uninstall PowerCLI modules.

You cannot use the Uninstall-Module cmdlet in offline mode. To uninstall PowerCLI in offline mode, you must navigate to the folder that contains the PowerCLI modules and delete them.

Prerequisites

  • Close all PowerShell sessions that are running PowerCLI.

Procedure

  1. Open PowerShell.
  2. To uninstall all VMware PowerCLI modules except VMware.PowerCLI, run the command:
    (Get-Module VMware.PowerCLI -ListAvailable).RequiredModules | Uninstall-Module -Force
  3. To uninstall the VMware PowerCLI main module, run the command.
    Get-Module VMware.PowerCLI -ListAvailable | Uninstall-Module -Force

Results

You removed PowerCLI from your system.