Originally Posted By: danilda
Need the following attribute: Enable Account.

i already wrote that above. Did you read my post at all? :|
 Code:
$user.AccountDisabled = 0
$user.SetInfo


 Originally Posted By: danilda
Also, can I place users in groups by using memberof attribute?

No, but this can:
 Code:
Function addtogroup ($adloginname,$adgroupname)
	
	$grouppath = "LDAP://cn="+$adgroupname+",ou=OuLocationOftheGroup,dc=domain,dc=com"
	$userpath = "LDAP://cn="+$adloginname+",ou=OuLocationoftheUser,dc=domain,dc=com"
	 
	$GroupObj = GetObject($grouppath)
	$UserObj = GetObject($userpath)
	
	$GroupObj.add ($UserObj.ADsPath)
	$GroupObj.SetInfo

EndFunction
_________________________
Eternity is a long time, especially towards the end. - W.Allan