Results 1 to 5 of 5

Thread: Add users to Group via Script - [WP]

  1. #1
    Join Date
    Apr 2004
    Posts
    64

    Add users to Group via Script - [WP]

    At my office we are running an Active Directory with Sharepoint. There are few scripts which as an Admin I need to run daily morning so that all our Users get added to our AD with and without emails. But a small problem is that there is no way I can check if any user is already added in the group. So I wanted a Script which can check this and if it founds any user already in the group, instead of adding him again, it should move on and add new users.

    Do anyone have such script? Any suggestions?

  2. #2
    Join Date
    Sep 2005
    Posts
    56

    Re: Add users to Group via Script - [WP]

    As far as I know adding the users to any group is just insignificant. However can I know why you don’t want to add the already added members again ? There is no disadvantage for the same. You are just trying to make your job more hectic.

  3. #3
    Join Date
    Sep 2004
    Posts
    132

    Re: Add users to Group via Script - [WP]

    Hello ABRIELLE. I found few links which will surely help you out. Just check these:

    Build a list of all current members into a table
    http://www.microsoft.com/technet/scr....mspx?mfr=true

    Build a second table of all users in AD
    http://techtasks.com/code/viewbookcode/1581

    Compare the two tables and insert members that are not in the security group
    http://www.microsoft.com/technet/scr....mspx?mfr=true

  4. #4
    Join Date
    Apr 2004
    Posts
    64

    Re: Add users to Group via Script - [WP]

    Thank you for your response guys.

    I agree i dont want to re-add already added members but is there any problem or issue if re-add those users again?

    Thats what I am not sure.

  5. #5
    Join Date
    Sep 2004
    Posts
    150

    Re: Add users to Group via Script - [WP]

    Nope, there wont be any problem. Infact it gets ignored by the system.

Similar Threads

  1. Replies: 6
    Last Post: 30-11-2011, 11:54 PM
  2. How to add and delete users in a distribution group?
    By Mulan in forum Windows Software
    Replies: 7
    Last Post: 16-02-2011, 08:11 PM
  3. can't add users to the local admin group
    By ride1600@cox.net in forum Windows Server Help
    Replies: 5
    Last Post: 07-07-2008, 06:37 PM
  4. script to add multple users to local admin group on servers
    By tdubb in forum Windows Server Help
    Replies: 1
    Last Post: 21-03-2008, 05:16 AM
  5. Group membership login script
    By Wooody in forum Small Business Server
    Replies: 1
    Last Post: 26-02-2007, 04:38 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,011,102.68879 seconds with 17 queries