09 Nov 2011 @ 10:31 AM 

One of my previous customers was a company in the financial sector. Such companies have several compliancy rules and much “evidence” needs to be gathered to prove that they are compliant.

They implemented SCOM which can monitor a lot, yet still some specific reports needed to be made.
I’m not that much of a SCOM guru and that’s why I turned to PowerShell.
The request.
Create a report every night where all mailbox access is reported, specifically who has access to mailboxes other than their own and which level of access they have… and of course which mailbox it is.

Here’s the script (yes, it’s a one-liner again):

Get-Mailbox | Get-MailboxPermission | where {$_.user.tostring() -ne “NT AUTHORITY\SELF” -and $_.IsInherited -eq $false} | Select Identity,User,@{Name=’Access Rights’;Expression={[string]::join(‘, ‘, $_.AccessRights)}} | Export-Csv -NoTypeInformation mailboxpermissions.csv

Post to Twitter

Posted By: Jeff Wouters
Last Edit: 23 Apr 2012 @ 06:47 AM

EmailPermalink
Tags
Categories: Exchange, PowerShell, Script


  • hans straat

    nice one Jeff. I retweeted it already

  • Alan Byrne

    Hi Jeff, I keep meaning to get myself trained and educated on powershell because its importance when working with MSFT technologies is growing and growing, and becoming more important with each product release.  What would be your advise to get trained and up to spped with powershell asap?  Thanks @alanbyrne:twitter 

  • http://www.jeffwouters.nl Jeff Wouters

    Hi Alan,

    For me to provide specific information I would need to know which product or area you want to focus on.
    But To start with the basic skills, here are some books that can help you get started:
    http://www.amazon.com/Windows-PowerShell-2-0-Don-Jones/dp/0982131429/ref=sr_1_1?s=books&ie=UTF8&qid=1321963364&sr=1-1
    http://www.amazon.com/Learn-Windows-PowerShell-Month-Lunches/dp/1617290211/ref=sr_1_1?s=books&ie=UTF8&qid=1321963396&sr=1-1

    And you could follow some peeps on Twitter that provide lots of good and handy information. I know of a few, such as @jeffhicks:twitter @powertip:twitter  @powershellguru:twitter and of course @jimposhible:twitter .
    Next to that, I started by following the hashtag #powershell for about a month and you’ll soon notice who to follow ( for your specific focus area).

    Good luck! And hope to come across one of your post :-)

    Jeff.


Get Adobe Flash player
 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 164
  • Comments » 150
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About



    No Child Pages.

Contact



    No Child Pages.