Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


adding users script

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,40239
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> adding users script
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 adding users script - 11/29/2006 8:36:50 PM   
  Zolta

 

Posts: 13
Score: 0
Joined: 11/29/2006
Status: offline
Hey, I am making an advanced script to add users in Active Directory (with terminal services & much more). And I like to keep it user-friendly.

So far my script only searches the main directory of the domain with the RootDSE command.
I'm looking for a way to include all subtree's, but can't seem to find it. Is this possible?


      

< Message edited by Zolta -- 11/29/2006 8:39:18 PM >
 
 
Post #: 1
 
 RE: adding users script - 11/30/2006 12:17:35 AM   
  SAPIENScripter


Posts: 271
Score: 2
Joined: 11/1/2006
From: SAPIEN Technologies
Status: offline
There are several ways you can search Active Directory.  The code you have for creating a user looks like a good beginning. How does search tie into your overall goal for the script? What are you searching for?  Are you trying to find an existing user?  Find the distinguished name of a group so you can add the user to it? If you can layout what you want the script to do, even if you just have comments about what you think should happen, that would help.

_____________________________

Jeffery Hicks
Windows PowerShell MVP
SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com

Follow Me: http://www.twitter.com/JeffHicks

(in reply to Zolta)
 
 
Post #: 2
 
 RE: adding users script - 11/30/2006 12:19:17 AM   
  ginolard


Posts: 1024
Score: 21
Joined: 8/10/2005
Status: offline
Here is an template I use for pretty much every AD-related script I create.


      

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to Zolta)
 
 
Post #: 3
 
 RE: adding users script - 11/30/2006 12:57:08 AM   
  Zolta

 

Posts: 13
Score: 0
Joined: 11/29/2006
Status: offline
Yeah.. I guess I should've told more 

The first thing Im stuck on is indeed to find the distinguished name of a group so I can add the user to it... combined with the inputbox.

< Message edited by Zolta -- 12/1/2006 1:45:05 AM >

(in reply to ginolard)
 
 
Post #: 4
 
 RE: adding users script - 12/3/2006 7:21:02 PM   
  Zolta

 

Posts: 13
Score: 0
Joined: 11/29/2006
Status: offline
bump

(in reply to Zolta)
 
 
Post #: 5
 
 RE: adding users script - 12/5/2006 1:15:10 AM   
  Zolta

 

Posts: 13
Score: 0
Joined: 11/29/2006
Status: offline
Is this even possible?

(in reply to Zolta)
 
 
Post #: 6
 
 RE: adding users script - 12/7/2006 2:32:01 AM   
  Zolta

 

Posts: 13
Score: 0
Joined: 11/29/2006
Status: offline


Oh well I went looking for another way. List box! Anyone would help me on that?
I want to list all the CNs of all the OUs in my domain. Then select the OU and add an user.

This one looks nice. It gives a list with all the OUs in my domain and shows the ADsPath.
But I dont even know where to start =/


      

(in reply to Zolta)
 
 
Post #: 7
 
 RE: adding users script - 12/7/2006 2:35:34 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
I would start with the "Read Me First" post that is pinned at the top of this forum.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to Zolta)
 
 
Post #: 8
 
 RE: adding users script - 12/7/2006 7:57:00 PM   
  Zolta

 

Posts: 13
Score: 0
Joined: 11/29/2006
Status: offline
Actually I did, all I'm asking for if the things I want to do are possible. Or give me a kick in the right direction where to look for.

I'm new to this but made the script at the first post (and more but not included)

(in reply to ebgreen)
 
 
Post #: 9
 
 RE: adding users script - 12/7/2006 9:56:38 PM   
  gdewrance


Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
Have you searched for addUsers.vbs or look her http://www.visualbasicscript.com/m_26397/tm.htm

(in reply to Zolta)
 
 
Post #: 10
 
 RE: adding users script - 12/8/2006 1:49:43 AM   
  Zolta

 

Posts: 13
Score: 0
Joined: 11/29/2006
Status: offline
yeah, I always get ldap queries where I still have to define the group. But I guess i'll just go look for some books about this.

(in reply to gdewrance)
 
 
Post #: 11
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> adding users script Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts