Sorry, search feature is not supported in Internet Explorer 11

Mailbox policies

This code sample outputs the following mailbox policies applied to a mailbox:

  • Sharing policy
  • Role Assignment policy
  • Retention policy
  • Address Book policy


In the below code sample, the $mailboxParams variable represents properties of an Exchange mailbox. To retrieve the properties, use the IAdmExchangeMailParametersOps::GetMailParameters method.


# Connect to the Adaxes service
$admNS = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$admService = $admNS.GetServiceDirectly("localhost")

# Bind to the user
$userDN = "CN=John Smith,CN=Users,DC=domain,DC=com"
$user = $admService.OpenObject("Adaxes://$userDN", $NULL, $NULL, 0)

# Get Exchange properties
$mailboxParams = $user.GetMailParameters()
# The $mailboxParams variable represents properties of an Exchange mailbox

# Sharing Policy
Write-Host "Sharing Policy:" $mailboxParams.SharingPolicy

# Role Assignment Policy
Write-Host "Role Assignment Policy:" $mailboxParams.RoleAssignmentPolicy

# Retention Policy
Write-Host "Retention Policy:" $mailboxParams.RetentionPolicy

# Address Book Policy
Write-Host "Address Book Policy:" $mailboxParams.AddressBookPolicy

See also