' List Mapped Network Drives


On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_MappedLogicalDisk")

For Each objItem in colItems
    Wscript.Echo "Compressed: " & objItem.Compressed
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Device ID: " & objItem.DeviceID
    Wscript.Echo "File System: " & objItem.FileSystem
    Wscript.Echo "Free Space: " & objItem.FreeSpace
    Wscript.Echo "Maximum Component Length: " & objItem.MaximumComponentLength
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Provider Name: " & objItem.ProviderName
    Wscript.Echo "Session ID: " & objItem.SessionID
    Wscript.Echo "Size: " & objItem.Size
    Wscript.Echo "Supports Disk Quotas: " & objItem.SupportsDiskQuotas
    Wscript.Echo "Supports File-Based Compression: " & _
        objItem.SupportsFileBasedCompression
    Wscript.Echo "Volume Name: " & objItem.VolumeName
    Wscript.Echo "Volume Serial Number: " & objItem.VolumeSerialNumber
    Wscript.Echo
Next
search for scripts

VbsEdit contains all these sample scripts!


Download Now!



Download   Home   Scripts

Copyright © 2001-2024 adersοft