ghutchins
asked on
Software to locate mapped drives on network client PCs
I am looking for a way to locate what drive letters certain client PCs on the domain have mapped. The below code works locally but not on remote clients.
Option Explicit
Dim strComputer, objWMIService, colDrives, objDrive
strComputer = Inputbox ("Please enter the station name")
If strComputer = "" then WScript.Quit
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colDrives = objWMIService.ExecQuery _
("Select * From Win32_LogicalDisk Where DriveType = 4")
For Each objDrive in colDrives
Wscript.Echo "Drive letter: " & objDrive.DeviceID
Wscript.Echo "Network path: " & objDrive.ProviderName
Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.