Die SID lässt sich auch im AD auslesen ...
Code
#include <AD.au3>
_ad_open()
If @error Then Exit MsgBox(16, "Active Directory Example Skript", "Function _AD_Open encountered a problem. @error = " & @error & ", @extended = " & @extended)
$ssamaccountname = @username
$aproperties = _ad_getobjectproperties($ssamaccountname)
If @error Then
;ConsoleWrite($ssamaccountname & @CRLF)
Else
For $x = 1 To $aproperties[0][0]
If $aproperties[$x][0] = "objectSid" Then
$sid = $aproperties[$x][1]
;ConsoleWrite($ssamaccountname & ";" & $sid & @CRLF)
MsgBox(0,"", $ssamaccountname & @crlf & $sid)
EndIf
Next
EndIf
_ad_close()
Alles anzeigen
Gruß gmmg