[OBSOLETE] Nuking ViGEm completely (thorough removal)

I found myself in a position where I had to get rid of every trace of ViGEm on a Windows 10 system, after having installed it using the PowerShell commands here. Possibly, installing and removing Parsec also leaves some of these files around.

Uninstaller (newer versions of ViGEm)

Run the uninstaller from the programs and features windows menu, then proceed to the driver service removal below.

PowerShell (old versions of ViGEm)

In an elevated PowerShell window:

Get-ViGEmBusDevice | Remove-ViGEmBusDevice

All your ViGEm devices should now be gone - check in device manager just to be sure.

Now, to get rid of all the Powershell tools we've used to install ViGEm, use these commands in an elevated PowerShell console:

Remove-Module ViGEmManagementModule
Unregister-PSRepository -Name "nuget.vigem.org"

If you get the error that the module is in use, make sure you close all other PowerShell windows.

Remove driver service

Now, to remove the remaining driver service - which is inactive and not loaded with the kernel, but still, if you want to totally get rid of all traces, use this in a Windows elevated prompt (as admin):

sc delete ViGEmbus

Now the driver service is removed and you can remove C:\Windows\System32\Drivers\ViGEmbus.sys yourself.

This should remove all ViGEm traces from your system, and get rid of the tooling in PowerShell. Be warned: Oculus software comes with its own ViGEm driver files (prefixed by Oculus_). Don't remove them!

Just to confirm: it is indeed safe to remove the ViGEMBus.sys binary by hand once the service is removed. Just don't try that with any other drivers on your system 😉 or it might be backup restore time 😬

Updated the original post, now ViGEm has a nice installer.