IServiceObjectSecurity Method: GetServicePermissions

GetServicePermissions
(
TrusteeName As String
) As ServicePermissions ;

Parameters

[in] String TrusteeName
Name of the user or group for whom the permissions are to be returned.

Return Value
ServicePermissions that the user or group has on the attached service.

Description
Gets the access permissions that a user or group has on the attached service. This method does not return permissions that the user has due to his group membership. Use GetEffectivePermissions Method of the IObjectSecurity Interface to get the indirect permissions.

Example

Dim ServiceSecurity As IServiceObjectSecurity
Set ServiceSecurity = CreateObject("DirectScript.ObjectSecurity")
'Attach to the messenger service on the computer "Moon".
ServiceSecurity.AttachService " messenger", "Moon"
'Get the permissions that the user John has on the "messenger" service
Debug.Print ServiceSecurity.GetServicePermissions ("Domainname\username")
 

 

 See Also