→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pcrockett
Engaged Sweeper
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.
4 REPLIES 4
pcrockett
Engaged Sweeper
Thanks!
Hemoco
Lansweeper Alumni
Best place to post is the Wishlist forum and here.

http://www.lansweeper.com/forum/yaf_postst1305_What-is-your-top-priority-feature-for-the-next-lansweeper-release.aspx

If you do any request, explain why this would be an advantage (of course some things are obvious)
pcrockett
Engaged Sweeper
Is there any place to manually add WMI requests (e.g. the one above) to Lansweeper or can it only be done from new version rollouts?
Hemoco
Lansweeper Alumni
You can't add the script, but the Win32_MappedLogicalDisk is on our list for next version.