Wengex / PyADLdap

Python frameWork to managing Microsoft Active Directory Objects from LDAP
GNU General Public License v2.0
3 stars 1 forks source link

Error when creating computer object #3

Open gus4520 opened 6 years ago

gus4520 commented 6 years ago

When trying to create a new computer object, I get the following error:

<bound method adComputer.save of 'CN=python-test,OU=Servers-NonWindows,OU=Computers,OU=SanDiego,OU=WWS,OU=SCEA,DC=example,DC=domain,DC=com'>

Here is my code:

ad = adLDAP(**dataConnection)

new_pc = ad.computers.new() new_pc.samaccountname = "python-test" new_pc.cn = "python-test" new_pc.dn = "CN=python-test,OU=Servers-NonWindows,OU=Computers,OU=SanDiego,OU=WWS,OU=SCEA,DC=example,DC=domain,DC=com" e = new_pc.save print e

Thanks!