objUser.Put “description” , “” でエラーになったのでメモ。
Clear the General Properties of an OU
https://gallery.technet.microsoft.com/scriptcenter/5a7eff60-bbc5-428f-817d-b16ce2c3870e
How Can I Set an Active Directory Attribute Value to NULL?
http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/23/how-can-i-set-an-active-directory-attribute-value-to-null.aspx
1 2 3 4 5 6 7 8 9 10 |
Const ADS_PROPERTY_CLEAR = 1 Set objUser = GetObject("LDAP://cn=matsuoka,ou=dev,dc=rootlinks,dc=net") objUser.Put "sn" , "matsuoka" If Desc <> "" Then objUser.Put "description" , Desc Else objUser.PutEx ADS_PROPERTY_CLEAR, "description" , 0 End If objUser.SetInfo |