Partager via


ExchangeUtils.CreateDistributionlist Method

Creates a distribution list in Microsoft Exchange Server 2000 or Exchange Server 2003.

Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)

Usage

'Usage
Dim TargetADMA As ConnectedMA
Dim DistinguishedName As ReferenceValue
Dim Alias As String
Dim returnValue As CSEntry

returnValue = ExchangeUtils.CreateDistributionlist(TargetADMA, DistinguishedName, Alias)

Syntax

'Declaration
Public Shared Function CreateDistributionlist ( _
    TargetADMA As ConnectedMA, _
    DistinguishedName As ReferenceValue, _
    Alias As String _
) As CSEntry
public static CSEntry CreateDistributionlist (
    ConnectedMA TargetADMA,
    ReferenceValue DistinguishedName,
    string Alias
)
public:
static CSEntry^ CreateDistributionlist (
    ConnectedMA^ TargetADMA, 
    ReferenceValue^ DistinguishedName, 
    String^ Alias
)
public static CSEntry CreateDistributionlist (
    ConnectedMA TargetADMA, 
    ReferenceValue DistinguishedName, 
    String Alias
)
public static function CreateDistributionlist (
    TargetADMA : ConnectedMA, 
    DistinguishedName : ReferenceValue, 
    Alias : String
) : CSEntry

Parameters

  • TargetADMA
    The Active Directory management agent through which the new object is provisioned.
  • DistinguishedName
    The distinguished name of the distribution list.
  • Alias
    The e-mail alias of the distribution list.

Return Value

Returns a CSEntry object that represents the connected data source entry.

Exceptions

Exception type Condition
System.ArgumentException

A required parameter is not present.

System.ArgumentNullException

A required parameter is null.

AttributeNotInInclusionListException

A required attribute is not selected in the management agent.

System.InvalidOperationException

You tried to create the same custom recipient more than once in the Provision method. This method is called for each metaverse object when a metaverse rules extension exists.

NoSuchObjectTypeException

The object type that is referenced is not in the schema.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

ExchangeUtils Class
ExchangeUtils Members
Microsoft.MetadirectoryServices Namespace
CSEntry Class
ExchangeUtils Class

Other Resources

Example: Distribution List