0 votes

We would like to have a report of not-disabled users and with user that have a exchange mailbox inside a business unit but for all business units.

We now generate a report wich is grouped by "MemberOfBusinessUnits" but we are currently unable to count the members of each group.

In the Adaxes Console GUI the User Count is shown, but these number is not included in the export (pdfx, xlsx): image.png

Is there a way to generate a simple report like:

Unit Count Users with Exchange
BU1 100 80
BU2 59 20

Is there a way to generate the diagramm chart automatically to show the user per business unit?

Thanks

by (100 points)
0

Hello,

Is there a way to generate a simple report like:

Yes, it is possible. However, there is no such possibility for Business Units whose membership rules contain value references. If your Business Units do not have value references in the rules, please, specify whether members can have mailboxes in on-premises Exchange, Exchange Online or both. Also, should the report always contain data for all Business Units?

Is there a way to generate the diagramm chart automatically to show the user per business unit?

Sorry for the confusion, but we are not sure what chart you need. Could you, please, provide a live example?

0

Hi

There will be only on-prem Exchange Users. We do not have value refernces. They are selected by the OU in the Active Directory: image.png

Yes, the data should always be generated for all Business Units.

For the chart, we imagine something like this. This could also be split into two charts (Active users/Exchange Users): image.png

The diagramm per Business Unit should be generated automatically so we dont have to define a "chart" manually for each business unit.

0

Hello,

Thank you for the provided details. Unfortunately, there is no possibility to make a chart like in your example. As a solution, the chart can contain two items for each Business Unit: the total number of members and the number of members with Exchange mailboxes. Does this approach meet your needs?

0

Hi

Two items would work too. The chart ist just an extra though.

The most important would be to get the table automised. Can you provide us with an example on how to do it?

Thanks

1 Answer

0 votes
by (289k points)

Hello,

Thank you for the confirmation. Unfortunately, there is no possibility to make a chart with two items per Business Unit, sorry for the confusion. To create the report that will output required information on Business Unit members:

  1. Launch Adaxes Administration Console.
  2. In the Console Tree, right-click your service node.
  3. In the context menu, navigate to New and click Report. image.png
  4. Enter a report name and select Script. image.png
  5. Click Next three times.
  6. In the Report-specific columns section, click Add. image.png
  7. Enter a column name (e.g. Total members count).
  8. Select Number and click Next. image.png
  9. Select Template.
  10. In the field below, enter a default column value (e.g. empty). The value will never be present in the column, but is required as the template cannot be empty. image.png
  11. Click Finish.
  12. Repeat steps 6-11 for the column that will contain the number of users with Exchange mailboxes.
  13. Click Next.
  14. Paste the below script into the corresponding field. In the script:
    • $totalCountColumnID - Specifies the unique identifier of the custom column that will contain the total number of Business Unit members. To get the identifier:
      • On the Columns step, right-click the custom column.
      • In the context menu, navigate to Copy and click Column ID. image.png
      • The identifier will be copied to clipboard.
    • $usersWithExchangeColumnID - Specifies the unique identifier of the custom column that will contain the total number of Business Unit members with exchange mailboxes.
$totalCountColumnID = "{37dc4068-d4c7-4d57-92f1-3234f015aa0f}" # TODO: modify me
$usersWithExchangeColumnID = "{3c273cbf-1d1e-4544-80a3-d7db3626d477}" # TODO: modify me

$businessUnitsContainerPath = $Context.GetWellKnownContainerPath("BusinessUnits")
$searcher = $Context.BindToObject($businessUnitsContainerPath)
$searcher.SearchFilter = "(objectCategory=adm-BusinessUnit)"
$searcher.PageSize = 500
$searcher.SearchScope = "ADS_SCOPE_SUBTREE"

try
{
    $searchResultIterator = $searcher.ExecuteSearch()
    $searchResults = $searchResultIterator.FetchAll()

    foreach ($searchResult in $searchResults)
    {
        # Bind to Business Unit
        $businessUnit = $Context.BindToObjectBySearchResult($searchResult)

        # Get total number of Business Unit members
        $members = $businessUnit.Members()
        $membersCount = $members.Count

        $usersWithExchangeCount = 0

        for ($i = 0; $i -lt $membersCount; $i++)
        {
            $member = $members.GetObject($i)
            if ($member.RecipientType -ne "ADM_EXCHANGERECIPIENTTYPE_MAILBOXENABLED")
            {
                continue
            }

            $usersWithExchangeCount++
        }

        # Specify column values
        $columnValues = @{ $totalCountColumnID = $membersCount; $usersWithExchangeColumnID = $usersWithExchangeCount }

        # Add Business Unit to report
        $Context.Items.Add($businessUnit, $columnValues)
    }
}
finally
{
    # Release resources
    $searchResultIterator.Dispose()
}
  1. Click Next and finish creating the report.
0

Thanks a lot, this worked like a charm and helped understand the script-based reporting.

Send report as email to custom receipient

Related questions

0 votes
1 answer

I think there is a bug in the member selection count in the web UI. When selecting a members in a group to do an export the count is 2x the actual selected users. In my ... select 5 members it would say 10, but I only am showing one user in the example.

asked May 15, 2015 by lasership (370 points)
0 votes
1 answer

When attempting to add a business unit as a trustee for a security role, it is not visible under the "Look in" drop down in the Assign Role window.

asked Jul 20, 2021 by ryan741 (120 points)
0 votes
1 answer

Dear Support, we try to use a "Custom Business Unit" in a "Property Pattern" for excluding OUs, but it doesn't works. We created a Business Unit called "Service OUs ... Membership Rules is the following filter set: Do you know whats wrong in my Business Unit?

asked Jan 28, 2014 by Napoleon (700 points)
0 votes
1 answer

I have a scheduled task that exports the members from a Business unit. However the number of members in the Business Unit (4648), does not equal the number of rows ... of where else I could look to determine the discrepancy, I would greatly appreciate it.

asked Aug 11, 2016 by sandramnc (870 points)
0 votes
1 answer

I've tried using the business container creation script and looping a foreach and I've been getting errors on the SetInfo part, just wondering what I'm doing wrong.

asked May 29 by ajmilic (100 points)
3,552 questions
3,242 answers
8,243 comments
547,828 users