Platform SDK: Exchange Server

IAcctMgmt::NtAccountDelete Method

Deletes the specified Windows NT domain account.

IDL Definition

HRESULT NtAccountDelete( [in] BSTR bstrDomain, [in] BSTR bstrUserLogin );

Visual Basic Definition

Public Sub NtAccountDelete( bstrDomain as String, bstrUserLogin as String)

Parameters

bstrDomain
The domain from which to delete the user account. If the string is empty, the local machine domain is assumed.
bstrUserLogin
The login name for the account to delete.

Remarks

Potential exceptions include HRESULT values of E_INVALIDARG as well as HRESULTs with the facility bits set to FACILITY_WIN32 (Win32). These values are generated by the standard call HRESULT_From_WIN32() function, returning the last thread error as an HRESULT across the interface. If the account was created successfully, the HRESULT value S_OK is returned.

Example

See the class example.