Link to home
Start Free TrialLog in
Avatar of GJohn32
GJohn32Flag for United States of America

asked on

Change Ownership of several Distribution List groups at once

I ran the two commands below to find out what DL's the owner manages.  
        Get-DistributionGroup | where {$_.ManagedBy -eq "xxxx"}
     
        Get-DynamicDistributionGroup | where {$_.ManagedBy -eq "xxx"}


Which returns a very high number list of DL's.  Is there a way to change all the DLs at once to the new owner?
ASKER CERTIFIED SOLUTION
Avatar of Mahmoud Sabry
Mahmoud Sabry
Flag of Egypt image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GJohn32

ASKER

I've requested that this question be closed as follows:

Accepted answer: 500 points for msabry06's comment #37599954
Assisted answer: 0 points for GJohn32's comment #37601254

for the following reason:

The Get-DynamicDistributionGro<wbr />up -organizationtionalunit did not work for me. &nbsp;But changing the command got it working.
i think the problem solved by using the pipe line idea