Script repository
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.