I recently had a Virtual Machine showing as invalid within a vSphere environment.
To fix the issue you need to reload the Virtual Machine. Run the following command from PowerCli.
(Get-VM [VM-Name] | Get-View).Reload()
Once you run the command you should see your Virtual Machine back in the inventory as normal and no invalid status.