Script repository

Modify Storage Quotas after adding a user to a group

Updated on: Jan 18, 2026, Views: 2873

Exchange, Group membership

The script modifies mailbox storage quotas after adding a user to a group. To execute the script create a business rule triggering After adding a member to a group.

# Bind to the new group member.
$newMemberPath = "Adaxes://%member%"
$newMember = $Context.BindToObject($newMemberPath)

# Update Storage Quotas.
$mailboxProps = New-Object "Softerra.Adaxes.Adsi.Exchange.AdmExchangeMailboxParameters"
$mailboxProps.StorageQuotas.IsModificationEnabled = $True
$mailboxProps.StorageQuotas.UseDatabaseQuotaDefaults = $False
$mailboxProps.StorageQuotas.IssueWarningQuota = New-Object "Softerra.Adaxes.Adsi.Exchange.AdmByteQuantifiedSize" 4244635648
$mailboxProps.StorageQuotas.ProhibitSendQuota = New-Object "Softerra.Adaxes.Adsi.Exchange.AdmByteQuantifiedSize" 5242880000
$mailboxProps.StorageQuotas.ProhibitSendReceiveQuota = New-Object "Softerra.Adaxes.Adsi.Exchange.AdmByteQuantifiedSize" 5242880000
$newMember.SetMailParameters($mailboxProps, 0)

Comments 0

You must be signed in to comment.

    Got questions?

    Support Questions & Answers

    We use cookies to improve your experience.
    By your continued use of this site you accept such use.
    For more details please see our privacy policy and cookies policy.