Skip to content

Latest commit

 

History

History
141 lines (107 loc) · 4.36 KB

nf-lmjoin-netgetjoinableous.md

File metadata and controls

141 lines (107 loc) · 4.36 KB
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.
NetGetJoinableOUs
NetGetJoinableOUs function [Network Management]
_win32_netgetjoinableous
lmjoin/NetGetJoinableOUs
netmgmt.netgetjoinableous
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
NetGetJoinableOUs
lmjoin/NetGetJoinableOUs
c++
APIRef
kbSyntax
DllExport
Netapi32.dll
NetGetJoinableOUs

NetGetJoinableOUs function

-description

The NetGetJoinableOUs function retrieves a list of organizational units (OUs) in which a computer account can be created.

-parameters

-param lpServer [in]

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.

-param lpDomain [in]

Pointer to a constant string that specifies the name of the domain for which to retrieve the list of OUs that can be joined.

-param lpAccount [in]

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.

-param lpPassword [in]

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.

-param OUCount [out]

Receives the count of OUs returned in the list of joinable OUs.

-param OUs [out]

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.

-returns

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
ERROR_NOT_ENOUGH_MEMORY
Not enough storage is available to process this command.
NERR_DefaultJoinRequired
The destination domain controller does not support creating computer accounts in OUs.

-remarks

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.

-see-also

NetGetJoinInformation

Network Management Functions

Network Management Overview