Skip to main content

Posts

OT: Looking for work

After working for my last employer for a very long time (over a decade in relatively the same job and location) a couple of weeks okay I finally finished up there in the hope of establishing a better work/life balance. So if your in need a of a overly creative Exchange Engineer/Developer/Scripter send me an email glenscales@yahoo.com no job too big or small :) . Cheers Glen

Importing a Outlook Express dbx file into Exchange using the EWS managed API and powershell

I recently switched to a new Laptop which had Windows7 which left me in a little bit of a hole as to how i could get access to some old email which i needed rather urgently that was located in a dbx file from a previous laptop where I had been using Outlook Express for a number of years. I found http://www.slipstick.com/outlook/convert_oe.htm which had a acceptable method of doing this but I thought I'd like to push this email into a Exchange Mailbox anyway so i decided to see if i could do this programmaticly. Turns out there is no real API that makes access t0 DBX files easy however a few people over the years have come up with methods to access these files, there is a PHP dbxparser which someone has also ported to C# on code-project here this was enough information to allow me to build a simple DLL that i could then use in Powershell to extract email and then using some simple code to upload the email into Exchange using the MIMEContent upload technique with EWS. In the end t...

Exchange 2007/2010 iPhone activesync discovery script

Update ** There is one problem with the script in this post in that its doesn't pick up the updates to the O/S as pointed out in http://www.hedonists.ca/2010/07/22/blocking-the-iphone-part-i . So the only 100% way would be to parse the IIS logs where you can grab the same information about the devices. I'll try to post a script that does parsing that should work on 2003 up. Thanks also to Dennis who sent another version of the script I've added to the download that give enhanced reporting** ** New scripted posted for IIS logs http://gsexdev.blogspot.com/2010/08/parsing-iis-log-activesync-traffic-for.html ** On January 9, 2007 Apple released their first iphone and unleashed on the world what is arguably one of the most successful user mobile devices on the planet (I'm not arguing technical merit here just end user experience). Kind of like a virus these phones have spread throughout corporations and into every nook and cranny some with the IT departments blessing othe...

Multi-User quick create Powershell form for Exchange 2007

One of the more mind numbing tasks that Exchange administrators perform is creating new users and mailboxes. If you've ever been asked to create 5-10 users at the same time and are staring at a number of very repedative mouse clicks especially if you detests wizards then this script can help out. This is version 2 of this script i created a number of years ago that allowed creating just one user at at time this improves on this original idea by using a Datagrid instead so allowing you to enter multiple users and being able to create the users with just one click (well hopefully). Its also quite usefull in development enviroments where you might want to create a large number of users at once. The script itself is fairly simple in that it just wrappers a simple Winform around the create mailbox command and users a Datagrid for multiline input. I've put a download of the code here the script itself looks like [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing...

Updating a Extended property based on Group Membership Powershell GUI

Group membership has long been used in directory services to provide a way of giving access to different objects, distribution lists and a variety of other useful things to solve everyday problems in both active directory and Exchange Infrastructures. There are a number of things that you can’t do with Groups in Exchange which can be slightly limiting if you’re trying to solve certain problems in an easy and flexible manner. Exchange provides a whole bunch of extended properties in Active directory that can be used for various things one of the more useful of this is being able to apply a specific proxyaddress based on a specific value set in a extended property via a recipient policy. It can also be useful in Transport Agents and Transport Rules and a number of different application uses. For example in most mail systems you will have logical grouping of users into distribution lists maybe loosely based on department function etc. If for example your sales department want to use a spe...

Enumerting the members of a nested group with ADSI and powershell

Its often useful with scripts and applications to be able to use Group membership to control what users are affected by a particular application or script. Enumerating nested group members in powershell seems to be a bit of art and there are few different approaches none of which i particular liked so i came up with my own. The following approach uses two hash tables to ensure that if a user is in multiple groups they only get enumerated once and also any circular group nesting are taken care of as well seems to work well for me so i thought I'd share it. In the case of this script he $groupName is the DistiguishedName of the Group you want to enumerate the members of. $repeathashGroup = @{ } $repeathashUser = @{ } function Get-member($GroupName){ $Grouppath = "LDAP://" + $GroupName $groupObj = [ADSI]$Grouppath foreach($member in $groupObj.Member){ $userPath = "LDAP://" + $member $UserObj = [ADSI]$userPath if($UserObj.groupType...

Exchange proxyaddress display and removal powershell gui for Exchange 2003,2007,2010

ProxyAddresses are something in Exchange environments that can be a challenge to maintain over a long period of time and also during migrations or consolidations something that you need to deal with. If your lucky then just modifying your recipient policies may work the magic that you need if not and you have a large number of users that you need to modify you need to look at creating a script or doing a lot of mouse work. The first challenge if your going to write a script to do this is because your going to be deleting information just doing a one-liner or simple script may mean you will end up removing more information than you want. So one way to tackle this is using a simple GUI script that will allow mutiple selects to at least control what and which accounts you are going to affect. The good thing about createing a simple Gui is that it can also be used to do some analysis first. So the script i've created allows you to search based on the proxy address domain you want t...
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.