I needed a way of listing access rights for users on shared mailboxes.
Google helped me out along with a little playing.
So I now have two PowerShell lines. One that lists users with full access to a mailbox, the other shows all users with the send as role.
Full Access
get-mailbox | %{$foo = $_; Get-MailboxPermission $foo | ?{$_.AccessRights -eq "FullAccess" -and $_.IsInherited -eq $false}} | ft {$foo},User,AccessRights
Send-As:
get-mailbox | %{$mailbox = $_; Get-ADPermission $mailbox.DistinguishedName | ?{$_.ExtendedRights -like "Send-As" -and $_.User -notlike "NT AUTHORITYSELF"}} | ft {$mailbox},user,{"Send-As"}
Run each of these to output the list of users.
Copy and save the info to a CVS file, then import into Excel by using “Fixed Width” Insert a line between each user, then it makes a nice easy report for managers to see.
« Hyper-V Child VM loses network connection Server 2008 R2 SP1 Property Owner is not available for Database »
what line is wrong about Pipeline not executed because a pipeline is already executing ?
************************************************
get-mailbox | %{$jsmith = $_; Get-MailboxPermission
$jsmith | ?{$_.AccessRights -eq “FullAccess” -and $_.IsInherited -eq $false}} | ft {$jsmith},User,AccessRights
*****************************************************
Pipeline not executed because a pipeline is already executing. Pipelines cannot
be executed concurrently.
+ CategoryInfo : OperationStopped: (Microsoft.Power…tHelperRuns
pace:ExecutionCmdletHelperRunspace) [], PSInvalidOperationException
+ FullyQualifiedErrorId : RemotePipelineExecutionFailed
Pipeline not executed because a pipeline is already executing. Pipelines cannot
be executed concurrently.
+ CategoryInfo : OperationStopped: (Microsoft.Power…tHelperRuns
pace:ExecutionCmdletHelperRunspace) [], PSInvalidOperationException
+ FullyQualifiedErrorId : RemotePipelineExecutionFailed