0 votes

Hallo Everyone

I've seen the Report for Exchange Mailboxes with OU, Send on Behalf, Full Rights and Send As Rights: https://www.adaxes.com/questions/10488/report-exchange-mailboxes-send-behalf-full-rights-send-rights

The Report above will search the Mailbox for the Users with Full Access permission, Send Behalf and Send As permission but, is it possible to go the other way around so that the User will be searched for the Mailboxes and list all Full Access permission, Send Behalf and Send As permission.

Example: image.png

User: Peter.Steinmann Identity: Which Mailboxes AccessRights: FullAccess

Kind regards,

by (340 points)
0

Hello,

Do we understand correctly that you want to select a user for report generation and the report itself should contain Exchange mailboxes the user has Full Access permissions for?

0

Yes exactly

1 Answer

0 votes
by (288k points)
selected by
Best answer

Hello,

Thank you for the confirmation. Please, find the script below. In the script:

  • $exchangeServer – Specifies the host name of the Exchange server to use.
  • $parameterName – Specifies the name of the AD object picker parameter used to select the user for search. The parameter name should be specified with the param- prefix.

For information on how to create reports, have a look at the following tutorial: https://www.adaxes.com/tutorials_ActiveDirectoryManagement_CreateReport.htm.

$exchangeServer = "exchangeServer.domain.com" # TODO: modify me
$parameterName = "param-MyParam" # TODO: modify me

try
{
    # Connect to Exchange server
    $session = New-PSSession -connectionURI "http://$exchangeServer/powershell" -ConfigurationName Microsoft.Exchange
    Import-PSSession -session $session -CommandName "Get-Mailbox", "Get-MailboxPermission" -AllowClobber

    $mailboxes = Get-mailbox -ResultSize Unlimited
    $guidsBytes = New-Object System.Collections.ArrayList
    $parameterValue = $Context.GetParameterValue($parameterName)
    foreach ($mailbox in $mailboxes)
    {
        $permissions = $mailbox | Get-MailboxPermission -User $parameterValue | Where{$_.AccessRights -like '*FullAccess*'}
        if ($NULL -eq $permissions)
        {
            continue
        }

        $guidsBytes.Add($mailbox.Guid.ToByteArray())
    }
}
finally
{
    # Close the remote session and release resources
    if ($session) { Remove-PSSession -Session $session}
}

# Add mailboxes to report
$searcher = $Context.CreateGuidBasedSearcher($guidsBytes)
$Context.Items.Add($searcher)

For your information, the report generation can take long time depending on the number of mailboxes you have. Unfortunately, there is no way to improve this without limiting the search scope as to obtain the desired it is required to first fetch all existing mailboxes and then check their permissions.

0

Thank you very much its working. Can i also add "Public Folder" Mailboxes to Search Criteria?

0

Hello,

Sorry for the confusion, but we are not sure what exactly you mean. Public folders do not have Full Access permissions. The following Microsoft article should be helpful: https://docs.microsoft.com/en-us/powershell/module/exchange/add-publicfolderclientpermission?view=exchange-ps. Please, specify what exactly you need to add to the report in terms of public folders.

Is there a way to do this with Exchange Online?
0

Is it Possible to add the comand to the Script so that Publicefolder will be search to like: -Name 'Access' -Value $_.AccessRights

0

Hello,

What exactly do you mean? We are not quite sure about the search criteria you specified. Could you, please, describe the desired report in all the possible details with live examples?

Adding Public Folder to the Serch Criteria

Related questions

0 votes
1 answer

Using the built in 'Deprovision' Custom Command, I would like the person that is trying to Deprovision a user (Help Desk member) be asked who (from a list of existing active ... to leave the question 'blank', which means that no one gets access to the mailbox.

asked Apr 22, 2020 by RayBilyk (240 points)
0 votes
1 answer

how can i create a report which gives me the details from an exchange mailbox as described in the subject? I would like to have a Report for Exchange Mailboxes with OU, Send on Behalf, Full Rights and Send As Rights thank you

asked Feb 22, 2021 by m_st (200 points)
0 votes
1 answer

Hello, i have a custom command which sets the oof-message for the selected user. in this custom command i have a parameter "param-vertretung" (ad-object picker). Now i want to ... and email of the stand-in in the oof-message. Can you help me with that? Thanks

asked Nov 13, 2020 by lohnag (160 points)
0 votes
0 answers

Good Afternoon, I'm looking for some clarification on what security settings I would need to apply to the Self-Service Users to allow them to update both their own ... accounts they have full access to. Please let me know if this requires more clarification.

asked Jul 22, 2021 by jtop (700 points)
0 votes
1 answer

We have a 3rd party vendor that we are able to add users based on AD security groups. What I need to do is set a parameter for the number of available licenses and whenever ... the group is 495 I would like an email to trigger telling me to add more licenses.

asked Oct 12, 2022 by A_Pastor (70 points)
3,536 questions
3,226 answers
8,218 comments
547,720 users