Active Directory UDF - Help & Support
#481
Posted 23 April 2012 - 06:55 PM
i could just use the SAM and get the same results
#482
Posted 26 April 2012 - 07:38 PM
the functions _AD_ObjectExists() returns 0 although the ad group exists!
$oAD_RecordSet.RecordCount = 0.
Br,
UEZ
The own fart smells best! ✌
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯
#483
Posted 27 April 2012 - 07:48 AM
Br,
UEZ
The own fart smells best! ✌
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯
#484
Posted 27 April 2012 - 12:05 PM
is there anything I could add to the UDF to handle such a case? Return an error code or something?
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
#485
Posted 27 April 2012 - 01:14 PM
I have a script that checks the users AD group membership, and based on that membership they receive a GUI that removes or adds extra options. The script appears to operate fine, and when I log in as a domain admin account I receive no errors. If I log in with any other user that has a different group membership, I receive 3 AD error messages before the GUI opens.
I am running the latest AutoIT 3.3.8.1 with AD UDF 1.2.0. I have even tried downloading the 1.2.0 udf again. I have also tried the latest beta 3.3.9.4 and used your latest udf 1.2.1, but that also doesn't make a difference. In fact I actually get 5 error windows appear instead of 3.
Here is my script:
_AD_Open() If _AD_IsMemberOf("Domain Admins", @UserName, 1) Then _MainAdmin() Else _MainUser() EndIf _AD_Close()
Here are screenshots of the error messages I receive in order below:
Thanks for any help you can provide me with.
Jeff
#486
Posted 27 April 2012 - 02:15 PM
Hi UEZ,
is there anything I could add to the UDF to handle such a case? Return an error code or something?
Yes please because the problem was hard to find! If there is a change to compare the name entered in "Group name (pre-Windows 2000)" and the display name?
Because when I used the string entered in Group name (pre-Windows 2000) it worked - the displayed name which is different doesn't work.
Maybe you can modify the function _AD_ObjectExists()
Thanks,
UEZ
Edited by UEZ, 27 April 2012 - 02:16 PM.
The own fart smells best! ✌
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯
#487
Posted 27 April 2012 - 02:30 PM
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
#488
Posted 27 April 2012 - 02:43 PM
#489
Posted 27 April 2012 - 02:57 PM
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
#490
Posted 27 April 2012 - 03:35 PM
Hi UEZ,Yes please because the problem was hard to find! If there is a change to compare the name entered in "Group name (pre-Windows 2000)" and the display name?
Because when I used the string entered in Group name (pre-Windows 2000) it worked - the displayed name which is different doesn't work.
Maybe you can modify the function _AD_ObjectExists()
Thanks,
UEZ
most of the functions in the AD UDF accept either SamAccountname or a Fully Qualified Domain Name (FQDN). If the function finds a "=" at position 3 it assumes a FQDN, else a SamAccountName. If you specify the DisplayName it is interpreted as SamAccountName. If the DisplayName does not equal the SamAccountName then you get a "not forund" error.
You will have to check the displayname - SamAccountName yourself because passing the DisplayName is not supported and the functions can't distinguish between DisplayName and SamAccountName.
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
#491
Posted 27 April 2012 - 10:41 PM
$sTargetOU = "OU=Users,OU=Blah,DC=Work,DC=net"
$sObject = "TESTUSER"
Global $iValue = _AD_MoveObject($sTargetOU, $sObject)
#492
Posted 27 April 2012 - 10:54 PM
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
#493
Posted 27 April 2012 - 11:02 PM
Can you please post the result of
#include <AD.au3> $aResult = _AD_GetObjectAttribute("TESTUSER", "cn") ConsoleWrite($aResult & @CRLF)
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
#494
Posted 27 April 2012 - 11:22 PM
the CN and SAM get combined like that on some users.
#495
Posted 30 April 2012 - 07:07 PM
i knew i could move the object at the command line so tried this a nd it works fine.
_AD_Open()
$sTargetOU = "OU=Users,OU=Blah,DC=Work,DC=net"
$sObject = _AD_SamAccountNameToFQDN("TESTUSER")
_AD_Close()
$moveString =" /c dsmove """ & $sObject & """ -newparent " & $sTargetOU RunWait(@COMSPEC & $moveString)
-or something like that
it too bad the MoveObject function would not work for me. all the other functions worked great.
any way thats for trying to help
#496
Posted 30 April 2012 - 07:54 PM
Can you please post the result of _AD_SamAccountNameToFQDN("TESTUSER")?
So I can check the function and - hopefully - remove the bug?
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
#497
Posted 01 May 2012 - 04:57 PM
CN=Last, First X - TESTUSER,OU=Blah,DC=Work,DC=net
moving user to
OU=Users,OU=Office,DC=Work,DC=net
#498
Posted 01 May 2012 - 05:10 PM
I'm going to test as soon as I'm in my office again.
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
#499
Posted 01 May 2012 - 06:50 PM
if i set a user to expire on 7/31/2012 , when i check the user in ADUC his expiration date is 7/30/2012.
i can just add a day the the date before i send it to the function i guess.
weird
#500
Posted 01 May 2012 - 07:06 PM
UDFs:
Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts
WordEX (2012-12-29 - Version 1.3 released) - Download
ExcelEX (2013-05-11 - Alpha 4 released) - Download
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users




This topic is locked

