/build/static/layout/Breadcrumb_cap_w.png

Add Domain users to group

Hi,

Can someone help me with problem which i have, and the problem is that i cannot join domain users using script:

Set oWshNet = CreateObject("WScript.Network" )
Set oShell = Wscript.CreateObject("Wscript.Shell")
sUser = oShell.ExpandEnvironmentStrings("%USERNAME%")
sNetBIOSDomain = oWshNet.UserDomain
sComputer = oWshNet.ComputerName
Set oGroup = GetObject("WinNT://" & sComputer & "/DB2USERS,group" )
Set oUser = GetObject("WinNT://" & sNetBIOSDomain & "/" & sUser & ",user" )
' suppress errors in case the user is already a member
If (oGroup.IsMember(oUser.ADsPath) = False) Then oGroup.Add(oUser.ADsPath)End If
On Error Goto 0

to a group, if i dissable UAC and add user admin rights then it works but that is not solution for me, so I`m asking you guys have any one met with a problem like my, coz everything works on XP but i need the same to work on Win 7.

plaes help!

0 Comments   [ + ] Show comments

Answers (2)

Posted by: anonymous_9363 12 years ago
Red Belt
0
Ahhhhhhhhhh...the joys of IBM's DB2 LOL.

You can - and should - avoid the requirement to create the local groups and users if you run a command line to tell it to use domain accounts and groups. Unfortunately, I can't recall what that command line is but it's documented on IBM's web site. Somewhere...
Posted by: lanselots 12 years ago
Fifth Degree Brown Belt
0
thank you for the information, ilooked every where and did not find anything about that, maybe didi not loked in correct place I dont know but still i think the best part would be some script or maybe some one have found such command line?
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ