↑  ←  Описание функции


_Security__GetAccountSid

Retrieves the security identifier (SID) for an account

#include <Security.au3>
_Security__GetAccountSid($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.

Возвращаемое значение

Успех:Returns a binary SID in a byte strucutre
Ошибка:Возвращает 0

См. также

_Security__LookupAccountSid

Пример

#include <Security.au3>

Local $tSID = _Security__GetAccountSid(@UserName)
If Not @error Then
    ; $tSID is structure filled with SID data for spesified account
    ; ... The rest of the script here...
EndIf