_Security__LookupAccountName
Retrieves a security identifier (SID) for the account and the name of the domain
#include <Security.au3>
_Security__LookupAccountName($sAccount [, $sSystem = ""])
Параметры
$sAccount | Specifies the account name. Use a fully qualified string in the domain_name\user_name format to ensure that the function finds the account in the desired domain. |
$sSystem |
[необязательный] Name of the system. This string can be the name of a remote computer. If this string is blank, the account name translation begins on the local system. If the name cannot be resolved on the local system, this function will try to resolve the name using domain controllers trusted by the local system. |
Возвращаемое значение
Успех: | Возвращает массив следующего формата: |
$aAcct[0] - SID String | |
$aAcct[1] - Domain name | |
$aAcct[2] - SID type | |
Ошибка: | Устанавливает @error |
См. также
_Security__LookupAccountSidСм. также
Искать LookupAccountName в библиотеке MSDNПример
#include <Security.au3>
Local $aArrayOfData = _Security__LookupAccountName(@UserName)
; Print returned data if no error occured
If IsArray($aArrayOfData) Then
ConsoleWrite("SID String = " & $aArrayOfData[0] & @CRLF)
ConsoleWrite("Domain name = " & $aArrayOfData[1] & @CRLF)
ConsoleWrite("SID type = " & _Security__SidTypeStr($aArrayOfData[2]) & @CRLF)
EndIf