Jump to content

adding domain users via command line


Recommended Posts


adduser.vbs

Set WshNetwork = WScript.CreateObject("WScript.Network")

strComputer ="WshNetwork.ComputerName"

Set objGroup = GetObject("WinNT://" & WshNetwork.ComputerName & "/Power Users")

Set objUser = GetObject("WinNT://domain1/group1")

objGroup.Add(objUser.AdsPath)

Link to comment
Share on other sites

I understand they are separate.

We want to give a domain user who is part of a domain group access to the power users group.

So, under power users, we'd add:

COMPANY\TECHS.

We'd of course have to authenticate. (because we're logged in as a local admin, not a domain user).

like this:

net localgroup "Power Users" "DOMAIN1\GROUP1" /add

but somehow, authenticate against the AD

Edited by dkreifus
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...