OptiPlex Posted October 16, 2004 Share Posted October 16, 2004 im ppullling out my hair here i want vb.net to gt the security group the account is in (e.g. domain\supernoobs, domain\administrators, domain\domain users, domain\ihatethis, etccccc) BUT IDONNO how ?? the code i find on interweb always return something weird (0,false,513 wtf???) and it don't work with user groups on AD :cry: Link to comment Share on other sites More sharing options...
0 John Veteran Posted October 17, 2004 Veteran Share Posted October 17, 2004 That's tough, because a user can be in multiple groups. You can run something like net user username | find "*" and that will return the local/AD groups the specified user is a member of. But you'll have to parse the output yourself... Edit: There's also this, but have fun porting it to managed code :rolleyes: http://msdn.microsoft.com/library/default....localgroups.asp Link to comment Share on other sites More sharing options...
0 azcodemonkey Posted October 17, 2004 Share Posted October 17, 2004 im ppullling out my hair herei want vb.net to gt the security group the account is in (e.g. domain\supernoobs, domain\administrators, domain\domain users, domain\ihatethis, etccccc) BUT IDONNO how ?? the code i find on interweb always return something weird (0,false,513 wtf???) and it don't work with user groups on AD :cry: 584747538[/snapback] Have you looked at WMI. There is an ADSI extension... http://msdn.microsoft.com/library/default....and_domains.asp Link to comment Share on other sites More sharing options...
Question
OptiPlex
im ppullling out my hair here
i want vb.net to gt the security group the account is in (e.g. domain\supernoobs, domain\administrators, domain\domain users, domain\ihatethis, etccccc)
BUT IDONNO how
??
the code i find on interweb always return something weird (0,false,513 wtf???)
and it don't work with user groups on AD :cry:
Link to comment
Share on other sites
2 answers to this question
Recommended Posts