Task Relevance for Network Drive by WMI

(imported topic written by Todd.CM)

Hi Everyone,

I need to complete a robocopy and delete a network drive to copy files from the exiting home drive to a new home drive.

I have a custom analysis (shown below) that shows 33 computers have a H Drive that need to be copied.

if exists(value “RemotePath” of it as string) of keys of (keys(“Network”) of Keys of key “HKEY_USERS” of registry) then (name of it & ": = " & value “RemotePath” of it as string) of keys of (keys(“Network”) of Keys of key “HKEY_USERS” of registry) else “Shared Drive Not Found”

Current our users are using a H (Home) Drive that exists as a Windows Mapped Network Drive to either a IP Address (192.168.0.48 or to a Computer Name (Voyager)

I have the following Relevance working under the QnA on my system as I use the Windows Network Drive Mapping to the IP Address of the Server.

q:

exists
select object (
“ProviderName from win32_LogicalDisk”
)
whose
(string value
of
property
"ProviderName"

of it as
lowercase
contains

“\192.168.0.48”
)
of
WMI

A
: True

T
: 8.037 ms

q:

exists
select object (
“ProviderName from win32_LogicalDisk”
)
whose
(string value
of
property
"ProviderName"

of it as
lowercase
contains

“\voyager”
)
of
WMI

A:
False

T:
8.647 ms

After creating a new task and adding a custom relevance to the relevance tab as a Relevance Expression Is True with the following, I am getting over 50 computers including servers that I know are not mapped with the H network drive.

exists
select object (
“ProviderName from win32_LogicalDisk”
)
whose
((string value
of
property
"ProviderName"

of it as
string
as
lowercase
contains

“\192.168.0.48”
)
OR
(string value
of
property
"ProviderName"

of it as
string
as
lowercase
contains

“\voyager”
))
of
WMI

Does anyone have an idea on what could be causing the incorrect reporting on the number of computers that need to complete the robocopy task?

Thanking you in advance,

Todd