Author Posts

by totalnet32 at 2013-03-06 16:24:04

I was hoping to email all users that have full access to shared mailboxes on one particular storage group. I need to see if I can delete shared mailboxes that are not needed. they are just regular mailboxes used for mass mailing.

I was thinking of using powershell to export all mailbox names with full access Permission and then have send-message email users with a "canned email"
With having a txt file i can test/control when and what user receive the email.

[PS] Get-Mailbox -ResultSize unlimited -database 'server\storage\db01'| Sort-Object -Property Identity | Get-MailboxPermission | where { ($_.AccessRights -eq "FullAccess") -and ($_.IsInherited -eq $false) -and -not ($_.User -like "N
T AUTHORITY\SELF") } | ft identity, user > c:\temp\text.txt

I would need the identity field to be in the subject and the user property in the TO field.
The foreach-object is giving me an issue.
$mailboxes = Get-Mailbox -ResultSize unlimited -database 'server\storage\db01'| Sort-Object -Property Identity | Get-MailboxPermission | where { ($_.AccessRights -eq "FullAccess") -and ($_.IsInherited -eq$false) -and -not ($_.User -like "NT AUTHORITY\SELF") }   foreach ($mailbox in $mailboxes) { # do something with$mailbox}