I am new to scripting and this forum, bear with me please. I am creating a login script for windows 2000 server.
--------
Set ADSysInfo = CreateObject("ADSystemInfo"
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
'Next line gives me error
strGroups = LCase(Join(CurrentUser.MemberOf))
--------
Here's what I know:
- Join gives me type mismatch error when the user is a member of Domain user and only one other group.
- Join works when the user is a member of domain user and more than one other group.
Here's what I think: MemberOf attribute is returning a string when the member is part of only 1 group other than domain user. MemberOf attribute is returning an array when the member is part of more than 1 group other than domain user.
WHY????????? - Why does this attribute behave this way, and what can I do about it.
--------
Set ADSysInfo = CreateObject("ADSystemInfo"
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
'Next line gives me error
strGroups = LCase(Join(CurrentUser.MemberOf))
--------
Here's what I know:
- Join gives me type mismatch error when the user is a member of Domain user and only one other group.
- Join works when the user is a member of domain user and more than one other group.
Here's what I think: MemberOf attribute is returning a string when the member is part of only 1 group other than domain user. MemberOf attribute is returning an array when the member is part of more than 1 group other than domain user.
WHY????????? - Why does this attribute behave this way, and what can I do about it.