WshCollection.Item

The Item property provides the natIndexth enumerated item as a string. It is the default property.

Syntax

WshCollection(natIndex) = strEnumeratedItem
WshCollection.Item(natIndex) = strEnumeratedItem
 

Example

Set WshNetwork = Wscript.CreateObject("Wscript.Network")
Set oDrives = WshNetwork.EnumNetworkDrives

Wscript.Echo oDrives.Item(0) = " "Z:"
Wscript.Echo oDrives.Item(1) = "\\Server\Share"