The Multifunctioning DBA

May 29 2009   9:58PM GMT

Exchange and Powershell



Posted by: Colin Smith
Tags:
Exchange
Exchange Management
Exchange Scripting
Powershell
Scripting

I was just asked to take a look at writing a script for our new Exchange environment. Now I do not have a lot of experiance scripting for Exchange but I love a Powershell challenge. The problem was that all of our distribution groups had been set up with one option incorrect. I was asked if I could script a change for all groups. If not then this would take days, perhaps weeks to fix by clicking on every group and changing the option and saving.

I logged into the exchange server and started tooling around. I found that I could get a list of all the groups by doing a simple get-distribution group command as follows:

get-distributiongroup | select name

This gave me the names of all groups. I sent that to a flat file to use later. I then used the get-member command to find the option that I needed to modify. Then I was able to do a set-distributiongroup “name of group” -proertyname 0. That  command made the modification that we needed. After verifying that I wrote a foreach loop and I was done in less than 30 minutes. When I called our IT director back and let him know that it was complete he was shocked and very happy. Powershell can make you look very good to upper managment.

Let me know if you have anything that you need a script for.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: