![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Active Directory and group copy Hi everybody, I'd like to move the group members to another group. I've isntalled the Quest cmdlets. I think the solution is near Add-QADGroupMember but I don't know how to use these... What is the best practices to do that ? Thanks ! |
My System Specs![]() |
| | #2 (permalink) | ||||||||||||
| Guest | Re: Active Directory and group copy Try Get-QADGroupMember GroupA | % { Add-QADGroupMember GroupB -Member $_ } ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #3 (permalink) | ||||||||||||
| Guest | Re: Active Directory and group copy On 28 fév, 16:19, "fan.of.tarja" <fan.of.ta...@xxxxxx> wrote:
get-content d:\taf\scripts\powershell\groupe\grp.txt | foreach { $grp = $_ Get-QADGroupMember $_ | select name,type,dn,@{n="Group";e={$grp}} } | export-csv -noType d:\taf\scripts\powershell\groupe \groupMembers.csv Perhaps, I don't know how to affect this users to the another group... | ||||||||||||
My System Specs![]() | |||||||||||||
| | #4 (permalink) | ||||||||||||
| Guest | Re: Active Directory and group copy To add users to a group, you can use the get-qaduser and pipe it to add-qadgroupmember like this Get-QadUser JoeUser | Add-Qadgroupmember GroupName To copy users to another group you could probably do something like Get-QadGroupMember OldGroupName | Add-QadGroupmember NewGroupName If you are "moving" the users, then you would have to remove the users from the first group which you could do with Remove-QadGroupMember Andy Blog http://www.get-powershell.com "fan.of.tarja" <fan.of.tarja@xxxxxx> wrote in message news:880bbdd0-6ab5-48ab-8fc5-49f25eff044f@xxxxxx
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #5 (permalink) | ||||||||||||||||||||||||||||||||||||||||||||||||
| Guest | Re: Active Directory and group copy On 28 fév, 16:49, Shay Levi <n...@xxxxxx> wrote:
And did you know if it possible to "move" the user ? (ie, clean the source group) ? | ||||||||||||||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||||||||||||||
| | #6 (permalink) | ||||||||||||||||||||||||
| Guest | Re: Active Directory and group copy Odd.. I also tried piping the members directly to Add-QadGrouMember, it didn't work. I'm behind a VPN connection but I'm not sure if this is the cause. Using foreach worked with no errors. ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com
| ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
| | #7 (permalink) | ||||||||||||||||||||||||||||||||||||
| Guest | Re: Active Directory and group copy Interesting. I got the qaduser one to work fine with a regular pipe. I just assumed the QadGroupMember would work as well. Thats what I get for assumptions ![]() Andy http://www.get-powershell.com "Shay Levi" <no@xxxxxx> wrote in message news:8766a9442128e8ca484fc0183d2a@xxxxxx
| ||||||||||||||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||||||||||||||
| | #8 (permalink) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Guest | Re: Active Directory and group copy On 28 fév, 18:05, "Andy Schneider" <a...@xxxxxx-powershell.com> wrote:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||