Hi guys,
I can get user and computer name from Environ,
How can i get Current user NT group?![]()
Please Login or Register to view this content.
Thanks,
Hi guys,
I can get user and computer name from Environ,
How can i get Current user NT group?![]()
Please Login or Register to view this content.
Thanks,
What do you wish when a user is member of many groups (this is usually the case!)?
No, i want something like this
example:
user 1 belongs to IT
user 2 belongs to marketing
user 3 belongs to production
when i get the username i want to have another field with the group.
I do not think you understood. A user often belongs to more than one group in Active Directory. In such a case what must the code return?
i want get the group of each user.
I try one more time. Imagine you have user named Ricardo. He may belong to many NT Groups - All users; Marketing; European colleagues; Systems Committee et cetera. What must the function return as answer?
If he belongs to marketing i want get marketing as his group
And how will the code know that you want Marketing as the answer and not one of the other groups? What is the logic?
That will return all the groups the user is part of to the Usr_groups object variable. I think that normally you would then test if a user is part of a certain group, rather than return which group the user is part of. As Izandol says you would normally be a member of many groups, for example, when I run that on my machine Usr_groups has 13 different items.![]()
Please Login or Register to view this content.
Thanks all,
my finish code
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks