Use ADSI to Set and Clear Active Directory Attributes

This post provides an example of how we can use ADSI to set and clear Active Directory Attributes.  We search for a user called “alkaneuser” and set or clear the department attribute. $objSearcher=[adsisearcher]'(&(objectCategory=person)(objectClass=user)(sAMAccountName=alkaneuser))’ $colProplist = “samaccountname”,”department” foreach ($i in $colPropList) … Continue reading