After upgrading to Madrid, running a discovery on Windows device may fail with below error, even if test credential is successful.
launchWMI: Access is denied. (Exception from HRESULT: 0x80070005(E_ACCESSDENIED))
Access to admin$ share on the target host was always a requirement for discovery to run successfully. For example, the document in the link below indicates that access to admin$\temp is required for WMI: Active Connections probe. The credential used should be a local administrator on the device being discovered.
On a Madrid Patch 3 release, a code change related to Powershell requires all WMIRunner probes to have access to the admin$/temp folder on the device being discovered.
Ensure that the credential used is a local administrator on the host being discovered. If the credential used has necessary privileges, the cause could be Anti-virus, Anti-malware protection software / Host intrusion Prevention Software, in that case, try to disable the antivirus for testing purposes.