Déja cherché !
Alors j'ai trouvé cela sur HeysGuy :
On Error Resume Next
Const ADS_SCOPE_SUBTREE = 2
objOU = GetObject("LDAP://ou=Finance,dc=fabrikam,dc=com" )
Set objConnection = CreateObject("ADODB.Connection" )
Set objCommand = CreateObject("ADODB.Command" )
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size" ) = 1000
objCommand.Properties("Searchscope" ) = ADS_SCOPE_SUBTREE
objCommand.CommandText = _
"SELECT ADsPath FROM 'LDAP://dc=fabrikam,dc=com' WHERE objectCategory='computer' " & _
"AND Name='atl-ws-01'"
Set objRecordSet = objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
strADsPath = objRecordSet.Fields("ADsPath" ).Value
objOU.MoveHere strADsPath, vbNullString
objRecordSet.MoveNext
Loop
Comme je suis une grosse bille en sripting, j'ai remplacé "AND Name='atl-ws-01'" par "AND Operatingsystem='Windows XP Professional'"
Mais bon evidemment, ca marche pas !