FileShareName As String,
[HostComputer] As Variant
[in] String FileShareName
Name of the file share whose security has to be read.
[in] Variant HostComputer
Computer that is hosting the file share. This computer is also used to look for user and group accounts.
Initializes the ObjectSecurity object with the security of the specified file share.
Only members of the Administrators or Account Operators local group or those with Communication, Print, or Server Operator group membership can manage file shares. This includes creating and deleting file shares, viewing and changing file share properties and changing permissions on file shares. Permissions on a file share indicate the users who can use that file share and what actions they can take.
Dim ObjSec As IObjectSecurity
Set ObjSec= CreateObject("DirectScript.ObjectSecurity")
'Attach to the share "ShareName" on the computer "MOON"
ObjSec.AttachFileShare "ShareName", "MOON"