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

This is an update to my function to extract Mailbox folder permissions as PowerShell objects, allowing various forms of processing.

The main script is here.

In this update I’ve made the function skip some default folders it can’t process, treat the root of the mailbox better and improved the logging.

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

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”

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: Setting Exchange Send-As Permissions without Using the Add-ADPermission cmdlet

The Send-As permission for objects in Exchange is set on the AD object (rather than the mailbox itself). Normally, the weapon of choice is the Add-ADPermission cmdlet but interestingly that cmdlet is only available if you have some serious Exchange permissions; Organization Management. What you’re doing though requires fairly low-level AD permissions; you’re just modifying some attributes on an object. So I did some investigation and came up with a function to set Send-As permissions without using Add-ADPermission. Continue reading “PowerShell: Setting Exchange Send-As Permissions without Using the Add-ADPermission cmdlet”

PowerShell: Moving SMTP Proxy Addresses to a New Mailbox

I do a lot of work with Exchange and Exchange Online (Office 365).  A common task is to move proxy SMTP addresses from one mailbox to another.  And commonly run tasks must get scripted.

It’s an obscure English by-law.

More detail below.

Continue reading “PowerShell: Moving SMTP Proxy Addresses to a New Mailbox”

PowerShell: Get Largest Mailbox Folders, One-Line Command

Another quick one-liner I’ve just figured out.  This will get the 20 largest folders in the mailbox sorted into descending order of size.  There was a big gotcha I needed to figure out which I go into after the break.

Continue reading “PowerShell: Get Largest Mailbox Folders, One-Line Command”