SmsGrantAdminRight

System Center

Updated: October 28, 2009

Applies To: System Center Configuration Manager 2007, System Center Configuration Manager 2007 R2, System Center Configuration Manager 2007 R3, System Center Configuration Manager 2007 SP1, System Center Configuration Manager 2007 SP2

In Microsoft System Center Configuration Manager 2007, the SmsGrantAdminRight function grants administrator credentials to the specified account.


int _stdcall SmsGrantDomainAdminRight(
      wchar_t* pLocalServer, 
      wchar_t* pAccountDomain,
      wchar_t* pAccountName, 
      wchar_t* pLocalDomain
);

Parameters

pLocalServer
Pointer to Unicode null-terminated string of the local system name with backslashes: \\MYSYSTEM

pAccountDomain
Pointer to the originating domain for the user account.

pAccountName
Pointer to the name of the user account.

pLocalDomain
Pointer to the local domain name.

 

Name Value

LSAAPI_SUCCESS

0

LSAAPI_ERROR

1

LSAAPI_ACCOUNT_NOT_FOUND

2

LSAAPI_ACCESS_DENIED

5

For accounts with trusted domains, the pLocalDomain and pLocalServer parameters should reference the domain and server in question. The trusted domain name, if present, must be removed from the account name. That is, do not submit an account string of type domain\user.

Windows NT/2000: Requires Windows NT 4.0 or later.

Version: Requires SMS 2.0 or later.

Library: Lsaapi.lib.

Header: Lsaapi.h.

Show: