I have this script that will show all mapped drives on a network computer, but like we can add a registry entry, I'd like to be able to add a WMI entry to Lansweeper to scan for the mapped drives. Is there a way to do that or am I restricted to custom auditing registry and files only?
strComputer = inputbox("Enter the computer name")
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colDrives = objWMI.ExecQuery("select * from Win32_MappedLogicalDisk")
WScript.Echo "Mapped Drives:"
for each objDrive in colDrives
WScript.Echo " Device ID: " & objDrive.DeviceID
WScript.Echo " Volume Name: " & objDrive.VolumeName
WScript.Echo " Session ID: " & objDrive.SessionID
WScript.Echo " Size: " & objDrive.Size
WScript.Echo
next
Thanks in advance.