UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:lmjoin.NetGetJoinableOUs |
NetGetJoinableOUs function (lmjoin.h) |
The NetGetJoinableOUs function retrieves a list of organizational units (OUs) in which a computer account can be created. |
|
netmgmt\netgetjoinableous.htm |
NetMgmt |
1faa912b-c56d-431c-95d5-d36790b0d467 |
12/05/2018 |
NetGetJoinableOUs, NetGetJoinableOUs function [Network Management], _win32_netgetjoinableous, lmjoin/NetGetJoinableOUs, netmgmt.netgetjoinableous |
lmjoin.h |
Lm.h |
Windows |
Windows 2000 Professional [desktop apps only] |
Windows 2000 Server [desktop apps only] |
Netapi32.lib |
Netapi32.dll |
Windows |
19H1 |
|
|
|
|
|
|
The NetGetJoinableOUs function retrieves a list of organizational units (OUs) in which a computer account can be created.
Pointer to a constant string that specifies the DNS or NetBIOS name of the computer on which to call the function. If this parameter is NULL, the local computer is used.
Pointer to a constant string that specifies the name of the domain for which to retrieve the list of OUs that can be joined.
Pointer to a constant string that specifies the account name to use when connecting to the domain controller. The string must specify either a domain NetBIOS name and user account (for example, "REDMOND\user") or the user principal name (UPN) of the user in the form of an Internet-style login name (for example, "someone@example.com"). If this parameter is NULL, the caller's context is used.
If the lpAccount parameter specifies an account name, this parameter must point to the password to use when connecting to the domain controller. Otherwise, this parameter must be NULL.
Receives the count of OUs returned in the list of joinable OUs.
Pointer to an array that receives the list of joinable OUs. This array is allocated by the system and must be freed using a single call to the NetApiBufferFree function. For more information, see Network Management Function Buffers and Network Management Function Buffer Lengths.
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be one of the following error codes or one of the system error codes.
Return code | Description |
---|---|
|
Not enough storage is available to process this command. |
|
The destination domain controller does not support creating computer accounts in OUs. |
No special group membership is required to successfully execute the NetGetJoinableOUs function.
For more information about organizational units, see Managing Users in the Active Directory documentation.