Tales From IT: How I got paid to play World of Warcraft for 3 months

Upset customers, complex systems, poor documentation, high-pressure situations, bizarre legacy choices.  Working in IT is hard work.

Except when it’s not.

Watching installations / patches run, interminable meetings, deciphering manuals (“What does ‘Klaatu barada nikto’ mean?”), hanging around for a change window to open;  there can be plenty of waiting around.

evildeadnecronomicon
“I found the regular expression documentation!”

But waiting around for 3 months with a client that had nothing for you to do but refused to let you leave?  That’s a pretty unique situation… Continue reading “Tales From IT: How I got paid to play World of Warcraft for 3 months”

More Family Board Games

Sometimes I’m pulled away (struggling / screaming / whimpering) from my PC to interact with my family in the real work.  Of course, ‘real’ is relative and it’s cool to play board games when the mood takes us.  I’ve got a lot of games but most aren’t really suitable for family play either because;

A) The game takes 3 hours to even set up the board.  By the point one or more family members have lost the will to live and have gone back to something more interesting like counting floating dog hairs or squabbling with siblings.
B) It involves the kind of cut-throat competitiveness that would make Machiavelli look like the Dalai Lama.

I wrote about some cool ones in another post.  Here are some more; Continue reading “More Family Board Games”

PowerShell: Export All Exchange Mailbox Folder Permissions In A Format For Further Processing: Part 1

Within Exchange (on-premise or Online) it’s sometimes helpful to export the delegate permissions that a user can set within their mailbox.  Get-MailboxFolderPermission is the cmdlet which will export that information for a particular folder.  The identifier needs to be in the format “john@contoso.com:\Marketing\Reports”.

That said there’s not an easy way to export the permissions on ALL folders within a mailbox and the output for that command isn’t very helpful for further processing.

So;  script.  It’ll take a mailbox as a parameter and output the permissions on all the mailbox folders (and subfolders) as objects.

This is the explanation about the initial version of the script, here.

Continue reading “PowerShell: Export All Exchange Mailbox Folder Permissions In A Format For Further Processing: Part 1”

PowerShell: Export All Exchange Mailbox Folder Permissions In A Format For Further Processing

Within Exchange (on-premise or Online) it’s sometimes helpful to export the delegate permissions that a user can set within their mailbox.  Get-MailboxFolderPermission is the cmdlet which will export that information for a particular folder.  The identifier needs to be in the format “john@contoso.com:\Marketing\Reports”.

That said there’s not an easy way to export the permissions on ALL folders within a mailbox and the output for that command isn’t very helpful for further processing.

So;  script.  It’ll take a mailbox as a parameter and output the permissions on all the mailbox folders (and subfolders) as objects.

I wrote a post about the initial version of the script and how it works in Part 1 here.

The first update, allowing the function to deal with special folders and the root better is here (Part 2).

I’ve also made the script stand-alone now (rather than a function).  So just save this as a .ps1 file and run it with the MailboxToProcess parameter and it will work.

ie;

$MB=Get-Mailbox Ororo.Monroe

c:\scripts\path\New-FolderPermissionReportObjectArray.ps1 -MailboxToProcess $MB
Continue reading “PowerShell: Export All Exchange Mailbox Folder Permissions In A Format For Further Processing”

LAN Yarns: The Vital Importance of Casus Belli in Free-For-All Games or How One Wrong Step From A Peon Costs You the Game

My friends and I have regular LAN parties.  Back in the day these were real LAN-only games without any connectivity to the Internet, matchmaking or progression systems.  People occasionally played team-games but the real measure of a man at the LAN was in Free-For-All.

Every man for himself, the true test of skill! (Actually a test of stamina over 4+ hour games).

One man standing atop the conquered nations of his peers while earning their grudging respect! (Actually while they all seethed and grumbled about cheap tactics and underhand ‘diplomacy’).

One of the key tenets of playing these FFA games was the necessity of Casus Belli. Continue reading “LAN Yarns: The Vital Importance of Casus Belli in Free-For-All Games or How One Wrong Step From A Peon Costs You the Game”

PowerShell: Function to see if a Set of Properties Are on a Custom Object

I’ve been using scripts that pass loads of custom objects back and forth as function parameters.  In some cases these objects are built dynamically so they could have different properties on them.

It’s useful then to check if a particular set of parameters are on an object.

Hence;  this function!  (After the line!) Continue reading “PowerShell: Function to see if a Set of Properties Are on a Custom Object”

PowerShell: Optimising a Scripts Performance (Archiving Web-Pages Script)

Hi.  I wrote and ran a quick script to crawl a web-site and archive all it’s web-pages.  It worked but I noticed some serious performance issues;  its memory usage would occasionally balloon up to 19 GB (!);  it would slow down occasionally and it just generally seemed inefficient.

So I had a think and came up with a better script with a few simple changes;  it stays on about 500MB usage now and runs much better 🙂 Continue reading “PowerShell: Optimising a Scripts Performance (Archiving Web-Pages Script)”

PowerShell: Archiving All The Web-Pages on A Site (Example: bbc.co.uk/food)

With the outcry caused by the BBC removing the BBC food section from their website and the rush of people trying to mirror it or download the data I thought; just how would you do that with PowerShell?

(Of course, if you’re not interested in re-inventing the wheel Wget does this much better)

After a bit of thought I came up with the following requirements;

  • It would need to recursively call itself going through all the links on the page.
  • These should be filtered so I only get the pages matching a particular sub page (in the bbc example we only want the /food ones).
  • It should download the pages and try and keep a representation of the hierarchy (so /food/recipies/cucumber.html is saved to \food\recipies\cucumber.html on the disk).
  • I’m not interested in fixing the links yet; as long as we get a copy it should be fine.
  • We need someway to terminate the recursion so it doesn’t keep processing the same pages.  It also needs to only process each page once.

So a vague loop would be to go to a web page, go to all the links matching the sub page we want, output them to disk and record the page name to a list to make sure we don’t visit it again.  You’d end up with a nice folder full of file versions of the website.

Invoke-WebRequest is good for this; it gets the web page content but also puts all the links from the page in a handy property of the object.  Easy to enumerate through!

The script and detail are after the break.

Edit:  I had another pass at this script and optimised it a bit here. Continue reading “PowerShell: Archiving All The Web-Pages on A Site (Example: bbc.co.uk/food)”

PowerShell: Get Largest Mailboxes on an Exchange Server (One-Line Command)

Hi.  Last week a customer asked me find out which mailboxes had eaten all the pies on a particular Exchange server;  getting a list of the largest mailboxes and whether they were in a disconnected state (already  removed and waiting purge).

To get an accurate picture I needed to take into account the deleted items in the mailbox as well.  It’s a small command but it’s got a few squirrelly bits I’ll go into as well after the line. Continue reading “PowerShell: Get Largest Mailboxes on an Exchange Server (One-Line Command)”