NetIsServiceAccount function

The NetIsServiceAccount function tests whether the specified standalone managed service account (sMSA) or group managed service account (gMSA) exists in the Netlogon store on the specified server.

This function has no associated import library. You must use the LoadLibrary and GetProcAddress functions to dynamically link to Logoncli.dll.

Syntax


NTSTATUS WINAPI NetIsServiceAccount(
  _In_opt_  LPWSTR ServerName,
  _In_      LPWSTR AccountName,
  _Out_     BOOL *IsService
);

Parameters

ServerName [in, optional]

The value of this parameter must be NULL.

AccountName [in]

The name of the account to be tested.

IsService [out]

TRUE if the specified service account exists on the specified server; otherwise, FALSE.

Return value

If the function succeeds, it returns STATUS_SUCCESS.

If the function fails, it returns an error code.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Lmaccess.h

DLL

Netapi32.dll

See also

NetAddServiceAccount
NetEnumerateServiceAccounts
NetRemoveServiceAccount

 

 

Community Additions

ADD
Show:
© 2014 Microsoft