I need help writing a BigFix Query (Relevance) for generating a report that displays all connected network drives on a system. The report should include:
Drive letter (e.g., Z:, Y:)
Network path (e.g., \\server\shared_folder)
I’ve tried the following query but encountered issues with "it used outside of 'whose' clause" errors:
(name of it, pathname of it) of drives whose (type of it = "DRIVE_REMOTE")
But it doesn’t seem to work correctly in BigFix Query.
Could someone provide a correct Relevance language query that will work in BigFix Web Reports or BigFix Query?
The complication here is that computers don’t have remote drive mounts, users do.
You’d probably need to find where those paths are stored in the Registry, then we can help you with the relevance to pull those registry paths for each logged-on user.
This is what we use to get the Drive letter and network Path. I think this will do what you are looking for.
if (exists current user) then (((name of it) & ": - " & (value “RemotePath” of it as string)) of (keys of key “Network” of it of (current user keys (logged on users) of registry))) else “No Current User”
This logic will only give you the currently logged in user, so it will likely be an issue if you have multiple users logged in at the same time for a shared computer.