How can I find a user in mon AD quand J'ai his/her SID.
Je ne want to rely on autre attributes, depuis Je suis trying to detect changes to these.
Example:
I get a message about a change to user record containing:
```
Message: User Account Changed:
Target Account Name: test12
Target Domain: DOMAIN
Target Account ID: %{S-1-5-21-3968247570-3627839482-368725868-1110}
Caller User Name: Administrator
Caller Domain: DOMAIN
Caller Logon ID: (0x0,0x62AB1)
Privileges: -
```
Je veux to notify le user about le change. So J'ai besoin de leur account-information depuis AD.
Récupérer les détails d'un utilisateur Active Directory à partir du SID
Re: Récupérer les détails d'un utilisateur Active Directory à partir du SID
Fire up Windows PowerShell et run:
```
$strSID="S-1-5-21-500000003-1000000000-1000000003-1001"
$uSid = [ADSI]"LDAP://"
echo $uSid
```
The output should look something like this,
```
distinguishedName : {CN=John Doe,OU=Domain Admins,OU=People,OU=xxx,DC=xxx}
Path : LDAP://
```
```
$strSID="S-1-5-21-500000003-1000000000-1000000003-1001"
$uSid = [ADSI]"LDAP://
echo $uSid
```
The output should look something like this,
```
distinguishedName : {CN=John Doe,OU=Domain Admins,OU=People,OU=xxx,DC=xxx}
Path : LDAP://
```