Hallo,
Ich nutze folgendenen Include. Wobei, hierbei fängt es schon an, denn aus dem Include geht nicht hervor, ob es die Version 3.1.1. oder 3.1.2 ist....
Code
; Active Directory Function Library. Include this to allow access to Active Directory Functions ; Author : Jonthan Clelland ; Email : jclelland@statestreet.com ; Version : 3.1.1 ;Version History -- Starting from v3.1 ; 3.1 -- First released version ; 3.1.1 -- Bugfix to _ADGetObjectsInOU, default $filter value caused errors. Has been changed. ; 3.1.2 -- Corrections made to comments, replaced occurrences of 'Samaccountname' with 'Full Distringuished Name' where this had changed ibn the code. ; 3.1.2 -- Change to '_ADUserCreateMailbox', added '$emaildomain' and removed the hard-coded Email Domain name. ; _ADDoError : Error event handler for COM errors. This is global so will pick up errors from your program if you include this library ; _ADCreateUser : Creates a user in a particular OU ; _ADCreateGroup : Creates a group in a particular OU ; _ADAddUserToGroup : Adds a user to a group (if the user is not already a member of the group) ; _ADRemoveUserFromGroup : Removes a user from a group ; _ADObjectExists : Returns 1 if the given object (SamAccountName) exists in the local AD Tree ; _ADModifyAttribute : Sets the attribute of the given object to the value specified ; _ADIsMemberOf : Returns 1 if the
Mein Script sieht so aus:
Code
#include ; Bsp.: IsMemberOf("AD Gruppenname",@username) If _ADIsMemberOf("groupall",@username) = 1 then MsgBox(0, "AD","User in der Gruppe") Else MsgBox(0, "AD","User nicht in der Gruppe") EndIf
Wenn ich dann das Programm starte, erhalte ich folgende Fehlermeldung:
We intercepted a COM Error !
Number is:80072032
Windescription: Es wurde eine ungültige dn-Syntax angegeben.
Script Line number is 283