Skip to main content

Posts

Showing posts from December, 2006

Quick Create Mailbox Powershell Form for Exchange 2007

A lot of times when your evaluating or testing code you may want to create some temporary mailboxes very quickly to test this or that. In Exchange 2007 the Exchange Command Shell’s new-mailbox commandlet gives a quick way of doing this. But because of the complexities of actually creating a mailbox eg knowing the Conical name of the OU and the name of the database you want to put it into etc actually typing all these values isn’t a fast or easy task. If your scripting this its not such a big deal because when your creating the script you can just cut and paste the values into your script and then you can run the thing a number of times and not have to worry about it. The Exchange Management Console provides wizards to create a mailbox but like all wizards they are designed to be easy to use not fast. So what I decided to do was see if I could put together a small 1 page form that you could run from the Exchange Command shell that would allow me to quickly put in the information that I...

Scripting Exchange Web Services (2007) with VBS and Powershell

I’ve been playing around with the new Exchange 2007 Web Services and thought I would share a few scripts. With a lot of API’s being deemphasized or disappearing completely in Exchange 2007, Exchange Web Services are the brave new world that confronts people who want to develop applications that run against an Exchange 2007 server. Like any other WebService EWS allows you to invoke different methods which will perform specific tasks by sending SOAP messages that contain certain properties and then receiving specifically formatted responses. For a scripting point of view it’s pretty easy firstly you need to authenticate the default authentication is NTLM so there is no need to worry about FBA synthetic logons and then it’s just a matter of posting a XML formatted SOAP message. If your familiar with using WebDAV the underlying methods you use are the same but the requests and responses are very different. Lets start with a simple send email example. smSoapMessage = "<?xml versio...

Exchange SMTP Log file DNS Test tool Powershell script

This powershell script is a combination of some of my past scripts (in particular the DNS util script ) wrapped up in a nice little GUI with buttons to make it easy to use on a daily basis. What this script does is allows you to open a SMTP log file (or if you don’t want to read the whole log file just a certain number of lines from a file) and it will then parse that log file into a DataGrid on a Winform. You can then select a line in the datagrid and use one of the Buttons provided to perform different DNS test on that log file entry. The tests it can do are Reverse DNS query on the Source Mail server IP Address (from the log file) MX lookup of the parsed domain name from a RCPT or MAIL SMTP command SPF lookup of the parsed domain name from a RCPT or MAIL SMTP command A Record lookup of the parsed domain name from a RCPT or MAIL SMTP command RBL lookup of Source Mail Server IP Address (Using SORB’s or any other RBL you like). To configure which RBL server to use you need to modify th...
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.