Code

Despite my working history in infrastructure, I have always been interested in the development side of IT.  I was introduced to programming during school with Visual Basic 6.  After school, when I had made the decision to work in IT, I studied at the Computer Power Institute of Technology in various modules including C programming which I excelled at (Average of A, see transcript).

Over the past few years in various positions supporting and administering different infrastructure & applications, I’ve been able to use this old skill of mine.

Project: Free solution to back up Hyper-V VMs automatically
Key technologies / objectives: PowerShell, Hyper-V

At Gameloft Australia, we needed a free solution to backup some non-mission critical VMs running on a Hyper-V server.  I wrote this Powershell script as a solution to the problem.  The script will pause, export and resume each VM one at a time and send an e-mail log to the addresses specified in the script.

Here is the code/script:
TXT: HyperV_BackupScript.txt
PS1: HyperV_BackupScript.ps1

Project: Cycling performance management pages in Atlassian Confluence CMS
Key technologies / objectives: C#, XML-RPC, Confluence, CMS, API

This project was to do with the development and maintenance of a script related to Performance Management at SEGA.  Nothing on the market was perfectly suited to us out of the box and as opposed to customising off the shelf solutions and having all employees learn it we decided to add functionality to an existing system staff were already familiar with.  This was a CMS by the name of Atlassian Confluence.  It featured a good layout engine, easy editing, page security permissions and more.  However, it did not have the ability to perform any page management functions in bulk with any sort of intelligence.  It did have an API available to make this possible though.

The following program was written in C#/VS Express and connects to Confluence instances via it’s XML-RPC API.  The script was executed bi-annually, when employees had their performance appraisals done.  Per employee, the script archives the existing performance management pages (PDP, Objectives & Bonuses) and creates new ones from templates (with appropriate permissions).  The script would also create a copy only for the employee’s lead that has a special set of permissions.  The program had the ability to exclude certain wildcards / names of people where the standard performance management process did not apply and it also gave the executor a final confirmation of the performance management profiles the script would process so as to prevent mistakes.  The script was always tested on a test instance before being executed on the live server.

The program had a robust UI & reporting even though I was the only one that was executing it in the event someone may take over the duty if I ever left.  As the performance management process was new, the script would be updated every 6 months to suit HR needs.

Here are two screenshots showing it’s interface & evolution:

Confluence page cycle script 2012

Confluence page cycle script 2012

Confluence page cycle script 2013

Confluence page cycle script 2013

Here is the binary (.net 4.0 required):
confluence page cycler 2013 Binary.zip

Here is a quick link to view some of the more pertinent code (Functions for moving the employee’s performance pages):
MyDeptPerformance_Function.cs

Here is the VS solution to review my code in detail:
confluence page cycler 2013 code VS solution.zip

Project: Archiving disabled/disconnected mailboxes on Exchange 2010 to PST
Key technologies / objectives: PowerShell, Exchange 2010

We were coming up to our maximum retention time for a lot of disconnected mailboxes in our Exchange instance before they were automatically deleted from the mailbox.  We decided for a few reasons we’d like to keep PST copies of these mailboxes.  In Exchange 2010 however, the mailboxes need to be connected to an active account for PSTs to be exported.  I found a few people online were also looking for something similar but no one had put the work in to automate it, so I did.

The script gets a list of all disconnected mailboxes for a specified server and stores their display names in a variable. It then connects the disconnected mailboxes (one a time) to an enabled AD user (e.g. mailbox archiver), queues the export request and waits for the export to complete before disconnecting the mailbox and continuing to the next user.  The display name is used for the file name & the name of the export request.

Here is the code/script:
TXT: ArchiveDisconnectedMailboxesToPST.txt
PS1: ArchiveDisconnectedMailboxesToPST.ps1

Project: Recording data in database via XML-RPC of SaaS/web application
Key technologies / objectives: C#, XML-RPC, VeMail API

A recurring request from clients for a web application I was supporting (VeMail/Vision6) was the ability to ‘scrub’ their database.  The database contained lists of contacts that received marketing e-mails.   As clients were charged on the number of contacts in their database (& subsequently the number of e-mails they send) and the system recorded who opened the e-mails, clients wanted to remove the contacts who weren’t opening them.  The existing solution was very manual and only allowed clients to view if contacts opened one of the last 3 e-mails.

I decided to create a script/program that would automate this very manual process and also allow clients to see if their contacts opened any previous e-mails as opposed to just the last 3.

This program was made in C#, leveraging an XML-RPC.NET library to connect to the clients database via the VeMail API.

Here is a screenshot:

'Record Contact Open Activity' Utility

‘Record Contact Open Activity’ Utility

Here is the binary:
RecordContactOpenActivity.zip

Here is the code:
RecordContactOpenActivity.cs

Project: Archiving/downloading all existing reports & e-mail messages in accounts
Key technologies / objectives: HTML/CSS, VBS, XML-RPC, VeMail API

A client asked if we can provide a downloadable copy of the data existing in her account.  Specifically, a copy of every message sent through the system (e-mail marketing) & amalgamated reports generated from the aforementioned e-mails. The development team was able to pull some of this from the backend but it did not include amalgamated reports, downloaded images or rewrite the html so the images would work locally and a few other things the client wanted.  I decided to write a script to download the data in a more useful format.  The client was happy to wait and it’d allow the development team to keep working on the product itself.

As I was doing a lot of HTML/CSS on the job and I’d recently been writing excel macros, I decided to create a ‘HTML application’ (.hta).  HTML applications are a little known about feature in Windows that allows you to write VB (or JavaScript) applications whilst using HTML/CSS for presentation. They are executed under the more lenient security context of a local application as opposed to scripts running in the browser.  This provides the ability to write to file systems and also open COM objects and more.

This application leverages an XML-RPC COM library to communicate with the API of the VeMail online marketing system.  It then downloads the emails, images, changes the code so the images work locally, downloads the individual reports, compiles an overview report and saves it to Excel spread sheets.

This application has a nice, clean interface and is simple to use.  You simply provide it your VeMail username, password and a destination folder.  Once you hit GO, The application will provide reports as to what the application is doing.

Here are two screenshots:

Save messages and campaign reports to your computer.

Save messages and campaign reports to your computer.

Process complete! (small account).

Process complete! (small account).

Here is the binary:
Campaign Saver.zip

Here is the source code:
campaignsaver source.txt

In addition to the above, I also have experience creating Excel macros (VBS), smaller bash scripts and modifying makefiles.

Here is the code/script:
TXT: ArchiveDisconnectedMailboxesToPST.txt
PS1: ArchiveDisconnectedMailboxesToPST.ps1