Skip to main content


Migration to Office 365 from GroupWise

Many users are migrating to the Office 365 platform and a good portion of those are migrating from GroupWise.  I  recently had the opportunity to migrate a client from GroupWise to Office 365 and wanted to leverage PowerShell.  There are several good reasons for this:

  • There are limited reports available from GroupWise and they never seemed to give me exactly what I wanted.
  • I wanted to get mailbox sizes and address book sizes in an excel format I could use for quick comparisons to see if a migration was successful.
  • We spread the migrations across 10 servers and wanted to organize users based upon mailbox size or number of messages so they would finish in the time frame allowed.
  • I needed to get the email aliases of the user in GroupWise so we could ensure the new mailbox in the cloud carried those same aliases.
  • I wanted to exercise my PowerShell chops – could it even be done?

Firstly, and most importantly, I believe you need GroupWise 8 SP1 for most of this to work properly.  I haven’t tried it on earlier versions, so your mileage may vary.

To make this script work, you will need a few things:

  • Create a Novell GroupWise Trusted Application
  • SOAP needs to be enabled on the GroupWise Servers
  • Novell SOAP API document – I am only showing the hard part which is getting the SOAP connection started, you will need to adjust so you can create your own SOAP queries

Here is the script, please do not run it in your environment w/o careful review… (there are limited comments here – I may add some when I have  more time)
#region functions
function Execute-SOAPRequest (

[String]$URL, [String]$actionUrl,[String]$session, [String]$gwapicall)
        write-host “Sending SOAP Request To Server: $URL”
        $soapWebRequest = [System.Net.WebRequest]::Create($URL)
        $soapWebRequest.ContentType = “text/xml;charset=`”utf-8`””
        $soapWebRequest.Accept      = “text/xml”
        $soapWebRequest.Method      = “POST”

$soapPartII = $null
        if (-not $SOAPRequest) {
            write-host “Creating SOAP packet.”
            $soapPartI = ‘
<s:Envelope xmlns:s=””>
<h:gwTrace xmlns:h=”” xmlns=””>false</h:gwTrace>
<h:session xmlns:h=”” xmlns=””>’
             $soapPartI += $session
            $soapPartI += ‘</h:session></s:Header>
<s:Body xmlns:xsi=”” xmlns:xsd=””>’
             $soapPartI += $gwapicall
            $soapPartI += ‘
<getAddressBookListRequest />

            $soapPartII =

        } else { $soapPartII = $SOAPRequest }
        write-host “Initiating Send.”
        $requestStream = $soapWebRequest.GetRequestStream()
        write-host “Send Complete, Waiting For Response.”
        $resp = $soapWebRequest.GetResponse()
        $responseStream = $resp.GetResponseStream()
        $soapReader = [System.IO.StreamReader]($responseStream)
        $ReturnXml =
[Xml] $soapReader.ReadToEnd()

        write-host “Response Received.”
        return $ReturnXml
$myPwd = “passwordhere”
$myUri = http://XXXX:XXX/soap
#************** Send the request – get session key ************************************************
$soap =

<s:Envelope xmlns:s=””>
<h:gwTrace xmlns:h=”” xmlns=””>false</h:gwTrace>
<s:Body xmlns:xsi=”” xmlns:xsd=””>
<loginRequest xmlns=””><auth xsi:type=”q1:TrustedApplication” xmlns:q1=””>

$ret = Execute-SOAPRequest $soap $myUri
Write-Host -ForegroundColor Cyan $ret.InnerXml

$parseXml = $ret.InnerXml
$sessionid = $parseXml.GetElementsByTagName(“session”).’#text’
Write-Host -ForegroundColor DarkGreen session $sessionid
#************** Send the request – getdiskspace ************************************************
# get disk space
$GwAPIstring = ‘<getDiskSpaceUsageRequest xmlns=””/>’

$ret = Execute-SOAPRequest $null $myUri $null $sessionid $GwAPIstring
write-host $ret.InnerXml
Comments or suggestions welcomed on this script, it was designed and created during a project in a few hours.  Let me know if you found it useful.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Suzanne George

Suzanne George, MCTS has developed, administered, and architected online web site applications since 1995 and has worked with many Technology Top 100 companies such as Netscape, AOL, Sun Microsystems, and Verio. With a focus on migrations, upgrades, and custom application and SharePoint integration with ESRI, Deltek Accounting Software, and SAP; she has often been asked to speak at conferences around the country. Currently, Suzanne sits on the MSL IT Manager Advisory Council, was a contributing author for SharePoint 2010 Administrators companion and the SharePoint Handbook, and is a Senior Solutions Architect for Perficient.

More from this Author

Follow Us