IADsFileShare Property: MaxUserCount

Property Name

Property Type

Gets and sets the maximum number of users allowed to access the share at one time. A value of -1 signifies that the maximum number of users possible are allowed to access the share. The maximum number of users that can connect to a computer depends on the version of Windows running. For example, the Windows workstation installation allows a maximum of 10 connections. So, if MaxUserCount is assigned a value above 10, it will be automatically reset to 10.


Dim FileShare As IADsFileShare
'Get the FileShare interface for the file share "ShareName". The DomainName can be skipped if the computer does not belong to a particular domain
Set FileShare = GetObject ("NTDS://DomainName/ComputerName/file_services/ShareName")
'Print the current max user count for the file share "ShareName"
Debug.Print FileShare.MaxUserCount
'Change the max user count for the file share "ShareName" to 7. 
FileShare.MaxUserCount = 7
'Save the change


See Also