[Paris upgrade]: WMI: Classify can fail, if "target_powershell_access" is false


Customers using legacy WMI Discovery are expected to back-out legacy WMI update set (Revert_To_Legacy_WMI) when upgrading to Paris as the out-of-the-box solution will determine WMI use dynamically. This is documented in KB0860580 and in ITOM Visibility release notes under section 'WMI performance host detection'.

To determine WMI use dynamically, from Paris, the probe runs two tests during Windows classification (WMI: Classify) -

1. If the credential/MID can access admin share on the target (\\target\admin$)

2. If #1 is true, invoke a powershell process on the target ("target_powershell_access").

If the check for "target_powershell_access" fails (because the target does not have powershell installed or the credential used does not have permission to invoke powershell on the target), the probe runs legacy WMI queries to fetch results that can be used for classification.

Unfortunately, along with the results returned from legacy WMI queries, the probe also returns an error string from the test for "target_powershell_access". The error string can be seen in input payload for WMI: Classify  probe.

<error>The result file \\<IP address>\admin$\temp\psscript_output_<GUID>.txt can't be fetched because it doesn't exist</error>

Discovery sensor will report this as an error in discovery log and fail Windows Classification even if the payload included information that was required to classify the device.

Steps to Reproduce

1. Run discovery on a Windows host
2. Ensure that the credential used cannot invoke powershell process on the target.
3. Notice that WMI - Classify fails with error
The result file \\<IP address>\admin$\temp\psscript_output_<GUID>.txt can't be fetched because it doesn't exist


Upon upgrading to Paris, back out of the update set "Revert_To_Legacy_WMI" and then import the XML update set attached.

It will override the files:

  1. ecc_agent_script_file_1ed24b15376001006b882d465abe5dd.xml which is a MID->Script File named "LaunchProc.psm1".
  2. ecc_agent_script_file_9de98e40736300102535b7385ef6a757.xml which is a MID->Script File named "WMIRunner.psm1".

Please remember that after importing updateset, LaunchProc.psm1 and WMIRunner.psm1 will not be upgraded in future upgrade: make sure you mark them to be upgraded manually by setting the "Replace on upgrade" field value to false for this file in the sys_update_xml table, or back out "PRB1435936 - workaround" update set prior the upgrade. 

Related Problem: PRB1435936