Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


AD Group Script

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> AD Group 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 >>
 AD Group Script - 5/20/2008 4:03:45 AM   
  RonV

 

Posts: 2
Score: 0
Joined: 5/19/2008
Status: offline
I am in need of a script that will read a text file full of computer ID's and then look for each computer in a certain AD group and if found, delete that computer from the AD Group.
In other words, we have AD Software distribution groups setup that I need to remove certain computer ID's from them, but there are too many to edit by hand,
Just wondering if there is a way a script can do it.
Thanks
RonV
 
 
Post #: 1
 
 RE: AD Group Script - 5/20/2008 4:26:01 AM   
  dm_4ever


Posts: 2664
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
It might be doable...the real question is what have you done/tried so far?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to RonV)
 
 
Post #: 2
 
 RE: AD Group Script - 5/20/2008 8:43:10 AM   
  RonV

 

Posts: 2
Score: 0
Joined: 5/19/2008
Status: offline
I'm very new to scripting, but i do have scripts that will delete computers from all of AD not specific groups.

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: AD Group Script - 5/20/2008 8:50:07 AM   
  dm_4ever


Posts: 2664
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
I haven't tried deleting a computer from an AD group, but doubt it would be very different than removing a user.

http://www.microsoft.com/technet/scriptcenter/scripts/ad/groups/adgpvb28.mspx

You would need to get the distinguished name of the group, bind to it, get the distinguished names of the computers, and remove them from the group.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to RonV)
 
 
Post #: 4
 
 
 
  

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 >> AD Group 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