RE: Identify mapped drives on a workstation
- From: "MFelkins" <MFelkins@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 18 May 2005 09:26:24 -0700
Answered my own question; (scriptomatic is our friend)
On Error Resume Next
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
arrComputers = Array("Computer NAME HERE")
For Each strComputer In arrComputers
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & strComputer
WScript.Echo "=========================================="
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_LogicalDisk",
"WQL", _
wbemFlagReturnImmediately +
wbemFlagForwardOnly)
For Each objItem In colItems
WScript.Echo "Caption: " & objItem.Caption
WScript.Echo "DriveType: " & objItem.DriveType
WScript.Echo "FreeSpace: " & objItem.FreeSpace
WScript.Echo "MediaType: " & objItem.MediaType
WScript.Echo "Name: " & objItem.Name
WScript.Echo "ProviderName: " & objItem.ProviderName
WScript.Echo "Size: " & objItem.Size
WScript.Echo "Status: " & objItem.Status
WScript.Echo "VolumeName: " & objItem.VolumeName
WScript.Echo
Next
Next
Function WMIDateStringToDate(dtmDate)
WScript.Echo dtm:
WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _
Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _
& " " & Mid (dtmDate, 9, 2) & ":" & Mid(dtmDate, 11, 2) & ":" &
Mid(dtmDate,13, 2))
End Function
"MFelkins" wrote:
> Hi,
>
> Is it possible to querry a workstation to see what the drive mappings ar for
> the current user. I am moving some folders from one server to another and I
> would like to see how my customers have their current drives mapped so that I
> can help them repoint their mappings.
>
>
> M - sorry if that does not make good gramatical sence.
.
- Follow-Ups:
- RE: Identify mapped drives on a workstation
- From: MFelkins
- RE: Identify mapped drives on a workstation
- References:
- Identify mapped drives on a workstation
- From: MFelkins
- Identify mapped drives on a workstation
- Prev by Date: Re: Default printer in script
- Next by Date: Need Help with Best way to check if local user account exists
- Previous by thread: Identify mapped drives on a workstation
- Next by thread: RE: Identify mapped drives on a workstation
- Index(es):
Relevant Pages
|