This is a PowerShell-Script that can be used to unify mailbox-level AccessRights of two of or more mailboxes. Inputs are given in graphical user interface that the script creates based on configuration written on JSON-file.
This script works on Exchange Server 2013.
In GUI, multiline inputbox is used to give one or more mailbox identifiers that are used to find mailboxes that access rights are to be changed. Singleline inputbox is used to give mailbox identifier that is used to find mailbox that access rights are to be used when changing rights of other mailboxes to be alike.
Using the Code
There are three different functions that are used in code:
AccessRights of single mailbox in this format: "User|AccessRight". Return value is used when changing
This function is responsible for unifying rights of two mailboxes. This is achieved by making necessary additions and removals of rights so that rights of two mailboxes whose identifiers were given as input are similar.
make_settings-function creates single GUI-component and makes settings for it. Uses JSON-file for this process.
Each JSON-file object-represents one GUI-component. These objects have properties that have information relating to component such as from which .NET-class component will be build and what is its size and location.
First object is reserved for forms-class and object's components array holds objects that have information related to buttons, inputs, etc. that are to be added to form.
StartPosition : "CenterScreen",
Topmost : "true",