PowerShell: A Simple Batch Processing System, Part 1

batchHi.  I’ve written a few scripts that have gotten to be quite large.  In all cases they’ve needed to make a series of changes to a set of objects and log the results.  It’s normally important that some of the later changes only get made if the earlier ones are successful;  for example only changing the default SMTP address on a mailbox if another SMTP address was added earlier.

This series of posts will go into a decent system I’ve found for accomplishing this with some skeleton examples that are (hopefully!) easy to adapt. Continue reading “PowerShell: A Simple Batch Processing System, 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”

Iceland : Day 4

Woke up today with aches and pains where I wasn’t even aware I had body-parts.  Apparently all the contortions I pulled to keep the right horse-riding posture were pretty new to a body finely-tuned and optimised for long-term computer use.  Luckily, we were booked to visit The Blue Lagoon;  a large geothermally heated spa.

Time to regenerate damaged muscles in mineral-rich, heated water.Bacta Tank

Continue reading “Iceland : Day 4”

Iceland : Day 3

Today we’d booked into an Icelandic horse riding tour.  The rest of the family love horse-riding but I’m always a bit wary of anything involving living creatures (or “random behaviour simulators”, as I describe them).  But Icelandic horses are different to the ones we have in the rest of Europe so I was a bit curious to try them out. Continue reading “Iceland : Day 3”