Location: Mail List

Ads

Skyscraper

The GPTalk Mailing List

The GPTALK mailing list is where you can send and receive email related to Windows Group Policy. You must subscribe to the list to send and receive mail from the list. The purpose of the list is to provide a forum for asking and answering technical questions related to Group Policy. Any question is fair game as long as it is related to Windows Group Policy.  The Archives for this list can be found on this page.

 

List Posts

Subject: RE: [gptalk] Script - Anyone have a working script to copy members of an existing group to another group
Prev Next
You are not authorized to post a reply.

AuthorMessages
RobertMarianiUser is Offline

Posts:35

05/19/2010 1:09 AM  
Alternatively a powershell command I use is:



dsquery group "cn=Source Group, ou=Source OU, dc=contoso ,DC=com" |
dsget group -members | dsmod group "cn=Destination Group, ou=Destination
OU, dc=contoso, dc=com" -addmbr



Regards,

Robert



From: xxxxxxxxxxxxxxxx
[mailto:xxxxxxxxxxxxxxxx] On Behalf Of Craig Buonora
Sent: Wednesday, 19 May 2010 6:51 AM
To: xxxxxxxxxxxxxxxx
Subject: Re: [gptalk] Script - Anyone have a working script to copy
members of an existing group to another group



Const ADS_GROUP_TYPE_GLOBAL_GROUP = &H2

Set objOU = GetObject("LDAP://OU=Finance, dc=fabrikam, dc=com")
Set objOldGroup = GetObject("LDAP://CN=Finance Managers, ou=Finance,
dc=fabrikam, dc=com")

Set objNewGroup = objOU.Create("Group", "Finance Department")
objNewGroup.sAMAccountName = "financedept"
objNewGroup.groupType = ADS_GROUP_TYPE_GLOBAL_GROUP
objNewGroup.Set Info

For Each objUser in objOldGroup.Member
objNewGroup.Add "LDAP://" & objUser
Next





On Tue, May 18, 2010 at 3:15 PM, Dzikowski, Michael <xxxxxxxxxxxxxxxx>
wrote:

One AD group to another, yeah.





From: xxxxxxxxxxxxxxxx
[mailto:xxxxxxxxxxxxxxxx] On Behalf Of David Radford
Sent: Tuesday, May 18, 2010 12:16 PM


To: xxxxxxxxxxxxxxxx

Subject: RE: [gptalk] Script - Anyone have a working script to copy
members of an existing group to another group



Please clarify, Are you copying members from one for example
distribution group in to another?



From: xxxxxxxxxxxxxxxx
[mailto:xxxxxxxxxxxxxxxx] On Behalf Of Dzikowski, Michael
Sent: 18 May 2010 15:49
To: xxxxxxxxxxxxxxxx
Subject: [gptalk] Script - Anyone have a working script to copy members
of an exisiting group to another group



Script - Anyone have a working script to copy members of an existing
group to another group in AD?



I can't find a working script...anyone got one?



I don't have powershell. Just vbs.







========================================================================
======
CONFIDENTIALITY NOTICE: This email contains information from the sender
that
may be CONFIDENTIAL, LEGALLY PRIVILEGED, PROPRIETARY or otherwise
protected
from disclosure. This email is intended for use only by the person or
entity
to whom it is addressed. If you are not the intended recipient, any use,

disclosure, copying, distribution, printing, or any action taken in
reliance
on the contents of this email, is strictly prohibited. If you received
this
email in error, please contact the sending party by reply email, delete
the
email from your computer system and shred any paper copies.

Note to Patients: There are a number of risks you should consider before
using
e-mail to communicate with us. See our Privacy Policy and Henry Ford My
Health
at www.henryford.com <http://www.henryford.com/> for more detailed
information. If you do not believe that
our policy gives you the privacy and security protection you need, do
not send
e-mail or Internet communications to us.
========================================================================
======
**********************************************************************


This communication is confidential and is intended only for the use of
the addressee(s) designated above. If you are not an addressee, you are
hereby expressly forbidden to copy, disseminate, distribute or in any
other way use this communication.



If you have received this communication in error please email us at
xxxxxxxxxxxxxxxx or telephone +44 (0) 0207 486 3661.


We reserve any and all possible rights to privilege in respect of this
communication.


We do not accept service by email nor can this or any email from us act
as acceptance of an offer to this Company or any member of its group of
companies. Pell Frischmann does not authorise any contract to be made
using email.






We accept no liability for communications that are either personal in
nature or do not relate to the business of Pell Frischmann.


Any file attachments to this communication will have been virus checked
prior to transmission, however you should carry out your own virus check
before opening.


Accordingly we do not accept liability for any damage or loss that may
occur from software viruses that may be attached to this communication.


Pell Frischmann Registered Office: 5 Manchester Square London W1U 3PD


"Pell Frischmann" is the trading name of companies registered in
England:


Pell Frischmann Consulting Engineers No. 4403030


Pell Frischmann Consultants No 1777946


**********************************************************************
========================================================================
======
CONFIDENTIALITY NOTICE: This email contains information from the sender
that
may be CONFIDENTIAL, LEGALLY PRIVILEGED, PROPRIETARY or otherwise
protected
from disclosure. This email is intended for use only by the person or
entity
to whom it is addressed. If you are not the intended recipient, any use,

disclosure, copying, distribution, printing, or any action taken in
reliance
on the contents of this email, is strictly prohibited. If you received
this
email in error, please contact the sending party by reply email, delete
the
email from your computer system and shred any paper copies.

Note to Patients: There are a number of risks you should consider before
using
e-mail to communicate with us. See our Privacy Policy and Henry Ford My
Health
at www.henryford.com <http://www.henryford.com/> for more detailed
information. If you do not believe that
our policy gives you the privacy and security protection you need, do
not send
e-mail or Internet communications to us.
========================================================================
======




--
Regards,

Craig M. Buonora
SABIC Innovative Plastics
CompuCom Systems, Inc.
Senior Networking Specialist
Operational Leader - Datacenter Team

1 Plastics Avenue
Building 59
Pittsfield, MA 01201

T 413.448.6902
D *838-6902
E xxxxxxxxxxxxxxxx

www.sabic-ip.com


You are not authorized to post a reply.
Forums >GPTalk >GPTalk Mailing List > RE: [gptalk] Script - Anyone have a working script to copy members of an existing group to another group



ActiveForums 3.7

Members

MembershipMembership:
Latest New UserLatest:larrys
New TodayNew Today:0
New YesterdayNew Yesterday:0
User CountOverall:1340

People OnlinePeople Online:
VisitorsVisitors:0
MembersMembers:0
TotalTotal:0

Online NowOnline Now:

Ads

Banner Inv
Copyright 2009 by GPOGUY.COM
Terms Of Use