We have a simple script to input a machine name and list that machines mapped drives:
strComputer = "computername"
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
If I run and neter my machine it returns info, when I run for any other machine on domain, it returns nothing. Rghts/permission issue?
Ideas?
strComputer = "computername"
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
If I run and neter my machine it returns info, when I run for any other machine on domain, it returns nothing. Rghts/permission issue?
Ideas?