Lists all the shared folders on a computer.

This script was tested using Kixtart 2001 (412) for Microsoft Windows, available from Kixtart.org.

Kixtart
Edit|Remove
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\"+ $strComputer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_Share")
For Each $objItem in $colItems
    ? "Access Mask:" + $objItem.AccessMask
    ? "Allow Maximum:" + $objItem.AllowMaximum
    ? "Caption:" + $objItem.Caption
    ? "Description:" + $objItem.Description
    ? "Install Date:" + $objItem.InstallDate
    ? "Maximum Allowed:" + $objItem.MaximumAllowed
    ? "Name:" + $objItem.Name
    ? "Path:" + $objItem.Path
    ? "Status:" + $objItem.Status
    ? "Type:" + $objItem.Type
Next