Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Need Exchange Powershell script

Posted on 2011-03-25
6
560 Views
Last Modified: 2012-05-11
Need a powershell script that would add a user to the managed by  list to all groups that have a current managed by user set. (Yes groups that already have a managed by user).

Thanks in advance!

0
Comment
Question by:Gary Dewrell
  • 4
  • 2
6 Comments
 
LVL 70

Expert Comment

by:Chris Dent
ID: 35215697

ManagedBy is not a list, it's a single entry. Do you want to overwrite the entry? Or do you only need to give them rights to modify membership?

Chris
0
 
LVL 12

Author Comment

by:Gary Dewrell
ID: 35215857
Hey Chris I am able to add multiple people to the Managed by properties within the GUI.

But it may not be needed let me explain the issue I am trying to solve.

On almost all of my Distribution Groups the Membership Approval settings are grayed out. The only fix i have found is to either:
1. Delete the currnet managed by user and readd it.
2. Add a second managed by user and then remove it.

So the goal is to make some change so that the Membership Approval section starts working.  
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 35215920

Sorry I missed Exchange 2010. It's possible they've changed it, but everything prior to that certainly has managedBy as a single user. You can work around that by adding permission to write the member attribute on the group, but that's not quite the same as approval settings.

Chris
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 12

Author Comment

by:Gary Dewrell
ID: 35215994
Correct that is why I thought add myself as a Managed by member and then removing it may fix the problem since that is what fixes the problem in the GUI>
0
 
LVL 12

Accepted Solution

by:
Gary Dewrell earned 0 total points
ID: 35218311
I found that modifing any parameter resulted in the Membership Approval settings being corrected. I wrote this script.
$count = 0
get-distributiongroup | where-object {$_.Managedby} | foreach-object {
$count += 1
write-host "$_.Alias"
set-distributiongroup -identity $_.Alias -CustomAttribute15 ""
}
Write-host "Total changed $count"

This resolved my issue.
0
 
LVL 12

Author Closing Comment

by:Gary Dewrell
ID: 35252810
Fixed my on problem See last post for details.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A procedure for exporting installed hotfix details of remote computers using powershell
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question