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 (320 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 (228k 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.

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?

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 (220 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 (100 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 (680 points)
0 votes
1 answer

I've got the following script so far using the SDK but running into an error: You cannot call a method on a null-valued expression. At line:1 char:1 + ... .BindToObjectByDN("$object.SearchResult.AdsPath.DN") $Context.Items.Add($item, $columnValues) } } } }

asked May 19, 2021 by richarddewis (260 points)
2,807 questions
2,541 answers
6,615 comments
65,733 users