I was recently exposed to a troubleshooting scenario where it was necessary to manually uninstall and reinstall the SCVMM agent from a node in a Hyper-V cluster. Since the node is clustered and managed by SCVMM, there is no option presented in the SCVMM console to be able to gracefully uninstall and reinstall the SCVMM agent. Therefore, manual removal and re-installation is necessary.
Removal of the SCVMM agent is straightforward provided that you are not running Server Core on the parent partition. Just use the Uninstall option in Add/Remove programs. Remotely, or locally while running Server Core, you could use something like
(Get-WmiObject -Class Win32_product -Filter “Name=’Microsoft System Center Virtual Machine Manager Agent (x64)'”).uninstall()
Conventional instruction would have you locate the agent installation via the System Center Virtual Machine Manager original installation media. If you have installed no Update Rollups in your SCVMM environment, then follow this link for guidance. If you have installed Update Rollups in the SCVMM infrastructure, you will need to install the latest version of the agent, which can be located on your SCVMM Management role server(s) under “%systemdrive%\Program Files\Microsoft System Center 2012 R2\Virtual Machine Manager\agents”. From here, select the server architecture and then select the latest agent version directory. If you simply run vmmagent.msi, you will get an error stating that the Microsoft System Center Virtual Machine Manager Agent (x64) Setup Wizard ended prematurely.
Instead, copy the latest agent version directory from the remote location to a local directory. Run a command prompt as Administrator, and change directory to the latest agent version directory that you have copied locally. Execute
msiexec /I vmmAgent.msi
The SCVMM Agent should reinstall successfully. In SCVMM, refesh the Hyper-V cluster and verify that there are no outstanding WMI issues on the (Host) > Properties > Status screen.