Hi all,finally got my adsl...
i don't seem to be having any problems executing this code towards either my local machine or towards a plain old nt4 pdc.
code:
break on$usr = GETOBJECT("WinNT://wcws321/administrators,group")
if @error = 0
$rc = $usr.getinfo
$propcount = $usr.propertycount
? "number of properties found: " + $propcount
?
$property = $usr.next()
while @error = 0 AND $property <> ""
? "Property name :" + $property.name
? "property type :" + $property.adstype
for each $propval in $property.values
$value = $propval
if $property.adstype = 3
? "with the value :" + $value.caseignorestring
endif
if $property.adstype = 7
? "with the value :" + $value.integer
endif
if $property.adstype = 8
? "with the value :" + $value.octetstring
endif
?
next
$property = $usr.next
loop
$user = 0
get $k
exit
succesfully binding to the group and displaying it's properties.
The following is a snippet of a user creation script using adsi/kix4 again against nt4 domains, this time using opendsobject method and all vars.
code:
for each $item in $fixedgroups
$grp = $root.opendsobject("WinNT://$domain/$item,group","$connuser","$connpw",1)
if @error = 0 and $grp <> ""
$grp.add("WinNT://$domain/$username")
$grp = 0
else
? "group $item not found, error:"
? @serror
$grp = 0
endif
next
btw i should finish up the loop in that script, it is quite nice..(remember getRID udf Shawn ???)
rgrds,
Maarten