当前用户Active Directory组列表



如何按活动目录打印当前用户所在的组?

我想打印单元格中包含当前用户的组。

Function IsMember(strDomain As String, strGroup _
As String, strMember As String) As Boolean
Dim grp As Object
Dim strPath As String
strPath = "WinNT://" & strDomain & "/"
Set grp = GetObject(strPath & strGroup & ",group")
IsMember = grp.IsMember(strPath & strMember)
End Function

我用这些代码解决了我的工作确定用户';s使用VBA 的组成员身份

最新更新