IAdmExchangeMailParametersOps2

The IAdmExchangeMailParametersOps2 interface extends the IAdmExchangeMailParametersOps interface with the ability to specify which Exchange properties will be returned per request.

Inheritance: IAdmExchangeMailParametersOps

Methods

Details

GetMailParameters()

Returns Exchange properties of the object. Unlike method IAdmExchangeMailParametersOps::GetMailParameters which always returns all Exchange properties, this method allows you to specify what Exchange properties to return.

IAdmExchangeMailParameters GetMailParameters(ADM_GET_EXCHANGE_PARAMS_FLAGS_ENUM props)

Examples

The following code sample wipes all mobile devices of a user mailbox.

[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

$serviceHost = "localhost"
$userDN = "CN=John Smith,CN=Users,DC=company,DC=com"

# Bind to the Adaxes service.
$ns = New-Object "Softerra.Adaxes.Adsi.AdmNamespace"
$service = $ns.GetServiceDirectly($serviceHost)

# Bind to the user.
$user = $service.OpenObject("Adaxes://$userDN", $null, $null, 0)

# Get the active sync feature.
$mailboxParams = $user.GetMailParameters("ADM_GET_EXCHANGE_PARAMS_FLAGS_NONE")
$activeSync = `
    $mailboxParams.MailboxFeatures.GetItemByType("ADM_EXCHANGE_MAILBOXFEATURETYPE_ACTIVESYNC")

# Wipe all mobile devices.
foreach ($mobileDevice in $activeSync.MobileDevices)
{
    $mobileDevice.WipeStatus = "ADM_MOBILE_DEVICE_WIPE_STATUS_WIPEPENDING"
}

$user.SetMailParameters($mailboxParams, "ADM_SET_EXCHANGE_PARAMS_FLAGS_NONE")

Requirements

Minimum required version: 2019.1

See also