• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 625
  • Last Modified:

Exchange 2010--Powershell--Give one user ManagedBy permission to many DL

Please provide the Powershell script that will give one user Managedby permission to many Distribution Groups

Thank you!
0
Anthony K O365
Asked:
Anthony K O365
1 Solution
 
SubsunCommented:
Try..
GC C:\list.txt | % {
 $Grp = get-distributiongroup $_
	$manage = $Grp.managedby
	$Newuser = Get-User "UserName"
	$Newmanage = $manage+$Newuser
 Set-distributiongroup $Grp.identity -managedby $Newmanage -bypasssecuritygroupmanagercheck 
}

Open in new window


Input file format
Group1
Group2
Group3

Open in new window

0
 
Anthony K O365Author Commented:
This worked like a charm!

Thanks much!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now