pyad

problems accessing object [<COMObject GetEx>] using python pyad

微笑、不失礼 提交于 2019-12-07 18:26:13
问题 I'm having problems trying to access the active directory user attribute using pyad. Here is my code: user = pyad.aduser.ADUser.from_cn("tuser") print user.get_attribute(lastLogonTimestamp") These are the printed attributes: C:\Users\tuser\Desktop\docb0t>python docb0t.py [<COMObject GetEx>] I have no idea how to retrieve the value off that object. How can I do it? 回答1: I ran into this same issue and after a little digging figured out the answer. You need to run the attribute through the

problems accessing object [<COMObject GetEx>] using python pyad

孤街浪徒 提交于 2019-12-06 10:37:42
I'm having problems trying to access the active directory user attribute using pyad. Here is my code: user = pyad.aduser.ADUser.from_cn("tuser") print user.get_attribute(lastLogonTimestamp") These are the printed attributes: C:\Users\tuser\Desktop\docb0t>python docb0t.py [<COMObject GetEx>] I have no idea how to retrieve the value off that object. How can I do it? I ran into this same issue and after a little digging figured out the answer. You need to run the attribute through the pyadutils.convert_datetime function. print pyadutils.convert_datetime(user.get_attribute('lastLogonTimeStamp',

pyad: Installs fine, but says it can't find adbase

廉价感情. 提交于 2019-12-01 09:23:00
This has me pretty confused. I've installed pyad using pip and everything seems fine: C:\WINDOWS\system32>pip install pyad Collecting pyad Using cached pyad-0.5.16.tar.gz Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\python35\lib\site-packages (from pyad) Requirement already satisfied (use --upgrade to upgrade): pywin32 in c:\python35\lib\site-packages (from pyad) Installing collected packages: pyad Running setup.py install for pyad ... done Successfully installed pyad-0.5.16 But when I try to use it, I get an error that complains about not finding adbase: C:

pyad: Installs fine, but says it can't find adbase

女生的网名这么多〃 提交于 2019-12-01 06:04:57
问题 This has me pretty confused. I've installed pyad using pip and everything seems fine: C:\WINDOWS\system32>pip install pyad Collecting pyad Using cached pyad-0.5.16.tar.gz Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\python35\lib\site-packages (from pyad) Requirement already satisfied (use --upgrade to upgrade): pywin32 in c:\python35\lib\site-packages (from pyad) Installing collected packages: pyad Running setup.py install for pyad ... done Successfully installed