C#.Net

C#.NET – Configure Exchange 2010 Tool

C#.NET – Configure Exchange 2010 Tool

======

Updated the code again, this time a minor bug in code.
Version is now 0.93.

======

Thanks to John A Cook @JohnACook, who found the issue. It’s now resolved, the tool is now updated and working in my lab environment.
It was a compilation issue, found out that it was compiled as a x86 tool. Sorry for that folks! Thanks a lot for helping me out

======

Download

ChangeLog:
0.93 – Updated minor bug in code
0.92 – Fixed the compile issue.
0.91 – The tool has now been updated to version 0.91, this update fixed if URL’s was not configured/null.

Description:

A while ago I was having this idea of creating a tool that configure the most common things on the Exchange server(s).

It took about 3-4 weeks to complete the application with all coding, which includes around 3000 lines in total.

The tool should be used locally on the server, since it’s using the Exchange PowerShell snapin when doing the query’s and configuring parts.

Besides the smaller parts that uses PowerShell the application is built on C#.NET.

Before going into detail, at the moment it’s version 0.9 since I’m about to optimize the code a bit more. I will update the blog post when it’s done.
Until then, use it as much you want and feel free to give any feedback (it’s great to get feedback).

The debugging of the application has been done on Exchange 2010 SP2, that’s the version it’s built for. But most likely it will work on RTM newer.

Description:

The tool will give you the opportunity to configure the following Exchange features:

Autodiscover, Outlook Web App, Active Sync, Web Services, Control Panel, Offline Address Book, POP/IMAP and Outlook Anywhere.

Check the screenshots below:

imageimageimage

All functions are built upon a query is done first and then it’s possible the change the current settings using the “Set” button.

The first tab is for configuring the Autodiscover SCP settings (Get-ClientAccessServer).
Press the Query button for requesting the current setting, and then you’re able to change it by editing the text and press “Set” button.

The second tab it for set the Internal and ExternalUrl for Outlook Web App, and also for the Logon format.

Third tab is used for Exchange ActiveSync, it’s possible to set the Internal and ExternalUrl and also set the Basic Authentication setting.

Fourth tab is for Exchange Web Services, Internal and ExternalUrl is about to be configured.

Fifth, Exchange Control Panel settings; Internal and ExternalUrl.

Sixth, Offline Address Book settings; Internal and ExternalUrl.

Seventh, POP and IMAP settings, it’s possible to change the Logintype, X509 name and set the Service to Automatic and Start it.

Eighth and final tab, Outlook Anywhere configuration, External hostname and what authentication setting is possible to change here.

About tab, it speaks for it self. Information about the small application

Note: The first query take some time, since it’s loading the snapin. Have some patience, but after the first one it should be pretty fast.

Download the application from here

Like I initially said I will do some code optimization, and will be updating this blog post when it’s done.
Feel free to leave comments, it’s always a pleasure to read them!

Ps. Use the application/code/scripts at your own risk. Test in lab environment first.

Thanks for reading

C#.NET – Create Mailboxes

C#.NET – Create Mailboxes

Updated:

Version 1.0.1 is released

I’ve added the possibility to create Room, Equipment and Shared Mailboxes.
The zip file with the application is now updated, one CSV example file is included.

=====

This is my 3rd C#.Net application, this one is creating mailboxes based on CSV file (semi colon separated).

I’m using FileHelpers for reading the CSV file, this dll file is embedded into the exe file for easier handle.

The application is using remote PowerShell, so make sure that you have enabled remote PowerShell for the user that’s configured.
Follow this link: http://technet.microsoft.com/en-us/library/dd298084.aspx

The remote PowerShell connection mechanism is the default (Windows Auth) one.

Start with browsing for the CSV file, semi colon separated (;), then press the Load button for loading up the contents in the CSV file.
The items will be counted in the upper right corner.

Next step is to press the Verify button for checking so that the mailboxes doesn’t already exists.
If some of them already exist, the Create button will not be clickable.
If some mailbox already exists, make sure to edit the CSV file and load it again and then hit the Verify button.

When none of the listed mailboxes are found, the Create button will be clickable.

After the mailboxes has been created it will list them with UPN and Status (OK, Created).
If you want to be sure that they were created, press the Verify button for checking if they exist.

(Or search for them using EMC/EMS)

image

Feel free to use the application how much you want, use it at your own risk and I don’t do any kind of support for it.

The application can be downloaded here.
CSV file example is included.

Thanks for reading

C#.NET – List all mailboxes

C#.NET – List all mailboxes

Since I promised to put the source code and the application here on the blog, so here it is.

The source code can be downloaded here.

It’s not any kind of advanced application, it lists all mailboxes in the environment it’s connected to.
The connection is done by using Remote PowerShell and can be configured in the Settings tab.

The importance to get the application working is to have Remote PowerShell configured for the connecting user.
And don’t forget if you’re using HTTPS the certificate names needs to be in place, or else it won’t work.

Feel free to use the code and customize it.
Just notify me or have a link the my blog.

There is a barrier before getting started and really learn and understand C#.Net so I want to thank Peter Ericsson, Martin Sundström and Mike Pfeiffer for some kind tips and tricks.
(Press their names for being redirected to their blogs.)

Thanks for your help