Cloud stories: Groupwise to Office 365 (part 3)

office 365 cloudIt’s been a while since part 2 of our Groupwise to Office 365 story but without further ado here’s the promised part 3 of our migration story…

How much to migrate?

Before figuring out how to move the data the first thing was to decide what we wanted to migrate. Starting from the basics the first question was “do we need to take anything?”

Starting from ground zero and providing users with an empty Office 365 mailbox would’ve been the easiest method. However it’s also the least helpful for staff as they need access to historical data so that idea was soon dismissed.

The next question was whether we could take a subset of the most recent data and keep the rest in an archive. In the end we decided that would be just as much work as moving everything and it was soon obvious we’d need to migrate complete mailboxes. Even the largest ones were a fraction of the 50GB per user we get on Office 365 so no worries on the space front, just a matter of deciding how to do it.

Tools of the trade

My colleague investigated various migration tools but not many work with GroupWise, which narrowed down the field pretty quickly. We also didn’t want to go to the trouble of doing double migration going from GroupWise > an in-house Exchange server > Office 365 as some Microsoft documentation suggested as an option. Quest produce a migration product that seemed to be the cream of the crop (and also recommended by Microsoft) but it also had a price tag to match. As one of the reasons for moving away from GroupWise was to reduce costs paying through the nose for a migration tool seemed counter-intuitive, so we went for the next best option…

Kernel Office 365 Migrator for GroupWise

kernel logo

This tool made by Nucleus Technologies offered us the core functionality of moving GroupWise data directly into a fresh Office 365 mailbox but at a fraction of the cost of Quest, just what we needed! However it did need a bit of ingenuity to do the end-t0-end migration process.

The tool itself was pretty simple to use and worked well with our migration method of going team-by-team, 20 or so users at a time in batch mode (usually running overnight). Batch processing mode allowed us to set off a list of users to be migrated overnight and worked well. We did hit a couple of snags but soon ironed them out:

Missing items

Initially we found some issues with a couple of mailboxes where email and calendar items were missing. We soon narrowed this down to inconsistencies in the mailboxes themselves and found that running GWCHECK before the migration process ensured a complete migration of all data.

Slow migration speeds

Although our 100Mb JANET connection had plenty of spare capacity we found the upload speed to Office 365 was quite slow. Reading the Technet forums suggests Microsoft limit upload speed into Exchange Online so bear this in mind and allow plenty of time for mailboxes to migrate, esepcially for very large (2GB+) mailboxes. Most of our migrations were started at 5pm so they’d complete for the following morning. There’s some more detailed information on the throttle rates at

Close the old mailbox

After the migration is complete ensure that the GroupWise mailbox is closed so the user can no longer login to it. Although users were notified that their accounts were being migrated and to use Outlook at next logon some still used the old GroupWise client by mistake.

Coexistence and the need for customisation

With nearly 1000 mailboxes to migrate, an Office upgrade to deploy and hundreds of users to train there was no way that a “big bang” changeover would be feasible. As a result we needed to run Office 365 and GroupWise side-by-side for a couple of months while users were moved over.

Our workaround for this was to use a forwarding rule on migrated mailboxes, which allowed GroupWise to continue serving mail for users still on the existing system whilst sending migrated users’ mail to Office 365.

The only problem with this plan was that GroupWise doesn’t allow rules to be configured on the server side, in fact they have to be done from the client GUI. Doing this manually for each user was going to take a lot of time and effort, as well as opening up additional risk due to human input error. We needed a better way…

AutoIt to the rescue

autoitI’d done some work with AutoIt in the past to automate a couple of particularly awkward software installations – in this case its ability to script window controls made it the perfect fit.

Along with the main installer also grab the enhanced version of the SciTE editor (I personally find it nicer to work with).

Previously I’d used AutoIt in quite a basic way using the recorder tool to grab a series of keypresses. Although this method often works I wanted to make the process a bit more robust if possible.

Squirreled away in the AutoIt program folder is the very useful window info tool that can be used to find the exact ID of particular buttons in dialog boxes, as well as window titles (more on that in a moment)

Run it from C:\Program Files (x86)\AutoIt3\Au3Info.exe and drag the finder tool onto an open window.

I created the tool to accept two command line arguments for the username and password of the GroupWise user (our GroupWise accounts weren’t linked to eDirectory and wouldn’t be used again after migration so no problem resetting passwords on those).We also needed to reset the GroupWise client settings to ensure the GUI was in its original state for the AutoIt code to run as expected.


$CmdLine[0] ; Contains the total number of items in the array.
$CmdLine[1] ; The first parameter.
$CmdLine[2] ; The second parameter.
$username = $CmdLine[1]
$password = $CmdLine[2]

We also need to include the Function for the WinWaitActivate command. The AutoIt recorder tool sets this up itself so I created a blank script and grabbed the function from it.

Func _WinWaitActivate($title,$text,$timeout=0)
 If Not WinActive($title,$text) Then WinActivate($title,$text)

I also set up some variables to make the GWIA email forwarding command that my colleague had researched:

$rulept1 = "web-mail.gwia:"
$rulept2 = ""

The next stepwas to run the GroupWise client (we built a dedicated Windows 7 32-bit VM so I knew the path would be OK). The last parameter ensures the client forgets the previously logged in user and always asks for credentials:

Run('"C:\Program Files\Novell\GroupWise\grpwise.exe" /@u-?')

Interestingly I still needed to add a mandatory 5 second load delay or the WinWaitActivate command didn’t work consistently. Reading back now using the WinWaitActivate function’s timeout option may have been a neater way of achieving the same result but either way it works as-is. A longer timeout value may be required on slower machines.

Sleep (5000)
_WinWaitActivate("Novell GroupWise Startup","")

Next part used the window info tool to find the IDs of the username and password fields then press Enter to login

ControlSetText("Novell GroupWise Startup","",1002,$username)
ControlSetText("Novell GroupWise Startup","",1003,$password)

Once logged in use keystrokes simulating the keyboard shortcuts of the client to open the Rules page (Tools menu, Rules) then create a new rule called Forward to Office 365

_WinWaitActivate("Novell GroupWise - Mailbox","")
Sleep (10000)
_WinWaitActivate("Open the Address Book","")
_WinWaitActivate("New Rule","")
Sleep (2000)

The code above creates a “Forward as Attachment” action for Received mail (use this to ensure the email gets to Office 365 in its original form).


I then push the forwarding rule (made up of the variables outlined earlier) into the command text box, with the username parameter sandwiched in between then press enter.


At this point we soon realised that many users had created their own rules, however our forwarding rule always needs to be at the top to be effective.

First we save the rule from earlier by clicking OK in a couple of dialog boxes:

ControlClick ( "Forward", "", 1)
_WinWaitActivate("New Rule","")
ControlClick ( "New Rule", "", 1)

The next step might make some programmers cry but a quick and easy solution was to press the “Up” button in the Rules GUI an arbitrary number of times (I chose 10) which forces the newly created rule up to the top. Repeat these two lines another 9 times 😉

Sleep (500)

When done exit the Rules window and exit GroupWise

ControlClick ( "Rules", "", 2)
_WinWaitActivate("Novell GroupWise - Mailbox","")

At that point I compiled the code into an EXE then it was a case of either launching the tool from a command line e.g.

C:\forwardtool\forward.exe auser password123

Or for batch processing put the login details in a CSV file and launch from PowerShell. Using PowerShell for the CSV side saves re-inventing the wheel in AutoIt to do the same thing and lets me use the command in two different modes.

$list = Import-Csv "C:\inputfile.csv"
foreach($entry in $list) {
    $username= $entry.username
    $password = $entry.password
    $exe = "C:\forwardv4.exe"
    $params = $username, $password
    $process = [Diagnostics.Process]::Start($exe,$params)

I then sat back, very pleased and slightly amazed as it chewed through the accounts, saving us loads of manual effort and avoiding typo-related issues too 😀


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: