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)”

PowerShell : Renaming And Sorting All My Music Files

We have a large collection of MP3s and FLACs and most of the time they all work great.  I’ve spent quite a bit of time getting their metadata correct so the various players we have all play them in the correct order as they use their Disc and Track number metadata to sort them.

However my wife’s and I’s cars both can read music from SD cards.  This is great as they’re a lot faster to process than phone libraries over Bluetooth but the downside is that the only sorting they do is via the filename.  This means every album plays it’s tracks in alphabetical order.

Ideally to fix this what I want is a script to rename each music file according to it’s Disc Number, Track Number and Title metadata.  The script I wrote to do exactly that follows, with some explanations after. Continue reading “PowerShell : Renaming And Sorting All My Music Files”