I sent the wrong one sorry I wasted your time. Try this, it is currently only set to run on a local system so it will have to be run on the server.
Set oWMI = GetObject("winmgmts:")
' Get only Disk Drive shares
Set oShares = oWMI.ExecQuery("select Name from Win32_Share where Type=0")
For Each oShare In oShares
' Connect to WMI and get the share security object for the share
Set oShareSecSetting = GetObject( _
"winmgmts:Win32_LogicalShareSecuritySetting.Name='" & oShare.Name & "'")
' Use the Win32_LogicalShareSecuritySetting Caption property to create a
' simple header before dumping the discretionary access control list (DACL)
WScript.Echo oShareSecSetting.Caption
' Call the Win32_LogicalShareSecuritySetting GetSecurityDescriptor
' method to retrieve an instance of the Win32_SecurityDescriptor class
' for the target object. Note that this is achieved by passing an empty
' variable to GetSecurityDescriptor, which GetSecurityDescriptor in turn
' initializes with an instance of the Win32_SecurityDescriptor class
' that corresponds to the security descriptor for the target object.
iRC = oShareSecSetting.GetSecurityDescriptor(oSecurityDescriptor)
If iRC <> 0 Then
Select Case iRC
Case 2
WScript.Echo "You do not have access to the requested information"
Case 8
WScript.Echo "Unknown failure"
Case 9
WScript.Echo "You do not have adequate privileges"
Case 21
WScript.Echo "The specified parameter is invalid"
Case Else
WScript.Echo "Unknown error"
End Select
WScript.Quit
End If
' After the security descriptor is retrieved, you can use the properties
' provided by the Win32_SecurityDescriptor class to dissect the security
' descriptor's access control lists (DACL and SACL) and access
' control entries (ACEs).
' Retrieve the content of Win32_SecurityDescriptor DACL property.
' The DACL is an array of Win32_ACE objects.
aDACL = oSecurityDescriptor.DACL
For Each oAce In aDACL
WScript.Echo
WScript.Echo "Access Mask: " & oAce.AccessMask
WScript.Echo "ACE Type: " & oAce.AceType
' Get Win32_Trustee object from ACE
Set oTrustee = oAce.Trustee
WScript.Echo "Trustee Domain: " & oTrustee.Domain
WScript.Echo "Trustee Name: " & oTrustee.Name
' Get SID as array from Trustee
aSID = oTrustee.SID
For i = 0 To UBound(aSID) - 1
strsid = strsid & aSID(i) & ","
Next
strsid = strsid & aSID(i)
WScript.Echo "Trustee SID: {" & strsid & "}"
Next
Next