0 votes

Thank you it works,

The Question i got is,

  1. What Value Separtor i have to use for Selecting multiple user for the AD object picker .
  2. For the this https://www.adaxes.com/script-repository/grant-full-mailbox-access-to-user-s502.htm how do I add send as permission access in the Script.
by (340 points)
0

Hello,

What Value Separtor i have to use for Selecting multiple user for the AD object picker .

It is not recommended to use the comma character (,) as it is present in distinguished names. You can use, for example, the semicolon character (;) as the value separator in a custom command AD object picker parameter.

For the this https://www.adaxes.com/script-repository/grant-full-mailbox-access-to-user-s502.htm how do I add send as permission access in the Script.

Do we understand correctly that the script should grant Full Access and Send As rights to the users selected in the AD object picker parameter? Or should the script only grant the Send As permissions? Please, provide us with all the possible details regarding the required behavior and we will provide you with the updated script.

0

Yes correct it should grant Full Access and Send As rights to the users selected in the AD object picker parameter.

1 Answer

0 votes
by (13.8k points)

Hello, Thank you for specifying. Please, find the script below. The script grants Full Access and Send As permissions to the users specified in the AD object picker parameter over the mailbox of the object the custom command is executed on. In the script:

  • $trsuteeDNsParamName - Specifies the name of the custom command parameter (with the param- prefix) used to select Active Directory objects to grant Full Access and Send As permissions to.
  • $valueSeparator - Specifies the value separator used in the configuration of the AD object picker parameter whose name is specified in the $trsuteeDNsParamName variable. image.png
$trsuteeDNsParamName = "param-Users" # TODO: modify me
$valueSeparator = ";" # TODO: modify me

# Grant permissions
$trsuteeDNs = $Context.GetParameterValue($trsuteeDNsParamName).Split($valueSeparator)
$mailboxParams = New-Object "Softerra.Adaxes.Adsi.Exchange.AdmExchangeMailboxParameters"
$mailboxRights = $mailboxParams.MailboxRights
$sendAs = $mailboxParams.SendAs
$sendAs.OverrideOldValues = $False
foreach ($dn in $trsuteeDNs)
{
    # Add Send as permission
    $sendAsObjReference = New-Object "Softerra.Adaxes.Adsi.AdmObjectReference"
    $sendAsObjReference.ObjectDN = $dn
    $sendAs.Add("ADS_PROPERTY_APPEND", $sendAsObjReference)


    # Add Full Mailbox Access permission 
    $fullAccessObjReference = New-Object "Softerra.Adaxes.Adsi.AdmObjectReference"
    $fullAccessObjReference.ObjectDN = $dn
    $permission = New-Object "Softerra.Adaxes.Adsi.Exchange.AdmExchangeMailboxPermission"
    $permission.AllowedRights = "ADM_EXCHANGE_MAILBOX_RIGHTS_FULL_ACCESS"
    $permission.Trustee = $fullAccessObjReference
    $permissionModification = New-Object "Softerra.Adaxes.Adsi.Exchange.AdmExchangeMailboxRightsModification"
    $permissionModification.Operation = "ADS_PROPERTY_APPEND"
    $permissionModification.Permission = $permission
    $mailboxRights.AddModification($permissionModification)
}

# Save the changes
$mailboxParams.MailboxRights = $mailboxRights
$mailboxParams.SendAs = $sendAs
$user = $Context.BindToObjectEx($Context.TargetObject.AdsPath , $True)
$user.SetMailParameters($mailboxParams, "ADM_SET_EXCHANGE_PARAMS_FLAGS_NONE")

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

Hi Everyone I want to create a custom command where I can select multiple users and then select a mailbox and give them full access to the mailbox. Is there a way to do it? Thank you for help

asked Nov 2, 2021 by Sandberg94 (340 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, is it possible to create a user and at the same time, select the security groups and distribution groups for this user ? Thx

asked Mar 19, 2012 by mmichard (360 points)
0 votes
1 answer

I have 18 domains managed by Adaxes and have noticed that Admin (full access) t all objects acts normally, but for piecemeal scopes like Service Desk that scopes to individual ... role (including 16 denies) and expect it to grow as we add more domains.

asked Sep 20, 2022 by DA-symplr (100 points)
3,541 questions
3,232 answers
8,225 comments
547,802 users