Page tree
Skip to end of metadata
Go to start of metadata

Description

Is a given user member of a specific group. This function only supports direct membership


Syntax

Function UsrMgr_IsUserMemberOfLocalGroup(sGroupName, sUsername) As Boolean


Parameters

sGroupName (String)

Group name

sUsername (String)

Username. Accepted format: LOCATION\USERNAME


Return value

The result will be stored in gbValue


Example

VBScript
If bStatus Then bStatus = UsrMgr_IsUserMemberOfLocalGroup("Administrators", "CapaInstaller\Username")
If bStatus Then bStatus = Job_WriteLog("Custom", "gbValue: " & gbValue,bStatus,True)

Scripting Guidelines


Related functions

UsrMgr_CreateLocalUser UsrMgr_CreateLocalGroup

  • No labels