$NomCompte = "Luc DUPONt" $UnCompte = Get-ADUser -LDAPFilter "(DisplayName=*$NomCompte*)" Write-Host $UnCompte.SamAccountName