water Posted January 5, 2017 Author Share Posted January 5, 2017 BTW: Does this work for you (replace <Domain> and <User> with real data)? $oObjectUser = ObjGet("WinNT://<Domain>/<User>") ConsoleWrite("Locked: " & $oUser.IsAccountLocked & @CRLF) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
legend Posted January 5, 2017 Share Posted January 5, 2017 43 minutes ago, water said: _AD_IsObjectLocked retrieves the LockoutTime from AD. Then it uses function _AD_GetPasswordInfo to retrieve the Lockout Duration to calculate the time when the object gets unlocked again. The AD UDF does not support fine grained password policy - which means that this causes the current problem. Will there be added support for that in the future? Link to comment Share on other sites More sharing options...
water Posted January 5, 2017 Author Share Posted January 5, 2017 No plans so far. I will start a survey and see how many people would like so see such a feature. But as I have no access to our AD (I'm an ordinary user, no admin), I would need someone to test this new feature My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted January 5, 2017 Author Share Posted January 5, 2017 Survey added: My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted January 5, 2017 Author Share Posted January 5, 2017 legend, to get a better understanding of how FGPPs work, could you please use the "Copy Data Only" function for the displayed array of example 1 of _AD_GetObjectProperties.au3 run on a user with FGPPs activated? Please remove all sensitive/company related information and send the data via PM. This way I hope to determine the effort it takes to add FGPP support to the AD UDF. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted January 5, 2017 Author Share Posted January 5, 2017 According to this website ... Quote The settings on the PSO may be considered confidential; therefore, by default Authenticated Users do not have Read Property permissions for a PSO. By default, only members of the Domain Admins group have Read Property permissions on default security descriptor of the PSO object in the schema. That's why I do not see any information about PSOs (Password Settings objects) in your user account. This means some modifications need to be done by the AD admin before an ordinary AutoIt script can read the properties My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
legend Posted January 6, 2017 Share Posted January 6, 2017 21 hours ago, water said: BTW: Does this work for you (replace <Domain> and <User> with real data)? $oObjectUser = ObjGet("WinNT://<Domain>/<User>") ConsoleWrite("Locked: " & $oUser.IsAccountLocked & @CRLF) yeah it works Could you use the data i sent you in pm? Link to comment Share on other sites More sharing options...
water Posted January 6, 2017 Author Share Posted January 6, 2017 Yes, based on your data plus info from the website I came to the conclusion I posted in #26. 16 hours ago, water said: That's why I do not see any information about PSOs (Password Settings objects) in your user account. This means some modifications need to be done by the AD admin before an ordinary AutoIt script can read the properties My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
MattHiggs Posted January 8, 2017 Share Posted January 8, 2017 On 1/5/2017 at 7:10 AM, water said: No plans so far. I will start a survey and see how many people would like so see such a feature. But as I have no access to our AD (I'm an ordinary user, no admin), I would need someone to test this new feature Your a regular user?! No way.. I'm on to your shenanigans, water. Link to comment Share on other sites More sharing options...
water Posted January 8, 2017 Author Share Posted January 8, 2017 No joke. I already posted that in 2009 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
crashnburn Posted February 7, 2017 Share Posted February 7, 2017 (edited) UPDATE: SOLVED I recently purchased a new laptop which is setup on my domain and is plugged in through ethernet. I have no issues with any domain related tasks but for some reason my AD scripts no longer work. I used to be able to use _AD_Open() and all worked fine, but now I have to fill in all the parameters in order for it to connect. Now I am receiving an error when working with the function _AD_SamAccountNameToFQDN. I am trying the _AD_SamAccountNameToFQDN.au3 example file and this is what I am receiving ==> The requested action with this object has failed.: Local $oRecordSet = $__oAD_Command.Execute Local $oRecordSet = $__oAD_Command^ ERROR When I implement _AD_ErrorNotify(1) this is what I am receiving: COM Error Encountered in _AD_SamAccountNameToFQDN.au3 AD UDF version = 1.4.1.1 @AutoItVersion = 3.3.14.2 @AutoItX64 = 0 @Compiled = 0 @OSArch = X64 @OSVersion = WIN_10 Scriptline = 465 NumberHex = 80020009 Number = -2147352567 WinDescription = Exception occurred. Description = An invalid dn syntax has been specified. Source = Active Directory HelpFile = HelpContext = 0 LastDllError = 0 ======================================================== COM Error Encountered in _AD_SamAccountNameToFQDN.au3 AD UDF version = 1.4.1.1 @AutoItVersion = 3.3.14.2 @AutoItX64 = 0 @Compiled = 0 @OSArch = X64 @OSVersion = WIN_10 Scriptline = 465 NumberHex = 80020009 Number = -2147352567 WinDescription = Exception occurred. Description = An invalid dn syntax has been specified. Source = Active Directory HelpFile = HelpContext = 0 LastDllError = 0 Any advice on how to troubleshoot this? Edited February 7, 2017 by crashnburn Link to comment Share on other sites More sharing options...
water Posted February 7, 2017 Author Share Posted February 7, 2017 Could you please download the latest version (1.4.7.0) of the AD UDF? IIRC the COM error handling was enhanced for AutoIt 3.4.12.x My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Valnurat Posted February 22, 2017 Share Posted February 22, 2017 Where do I download the new version of this UDF? 1.4.7.0 How do retrieve only content and not the number of how many itemts by using _AD_GetObjectsInOU. It tried this: _AD_GetObjectsInOU($sOU,Default,Default,Default,Default,True,Default) I tried to look at the WiKi, but it seems that there is less paramters. https://www.autoitscript.com/wiki/Active_Directory_UDF_-_GetObjectsInOU My version is 1.4.6.0 If I look in your hidden contents I see there is a "download" for 1.4.7.0, but that just point me to this page. Yours sincerely Kenneth. Link to comment Share on other sites More sharing options...
water Posted February 22, 2017 Author Share Posted February 22, 2017 (edited) Good finding! The download link is fixed now. The UDF does not support the Default keyword. Please check the wiki (section Tips & Tricks) for this. Hence _AD_GetObjectsInOU($sOU) should do what you want. Edited February 22, 2017 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Valnurat Posted February 22, 2017 Share Posted February 22, 2017 Tried to download it, but it seems it is the same as 1.4.6.0. The header in AD.au3 says it's 1.4.6.0 and the _AD_getObjectsInOU still have the same parameters. When I do this. $aComputers = _AD_GetObjectsInOU("OU=Desktops,OU=bla bla bla") _ArrayDisplay($aComputers, "Computers") $aComputersSource = _AD_GetObjectsInOU("OU=Laptops,OU=bla bla bla") _ArrayDisplay($aComputersSource, "ComputersSource") _ArrayConcatenate($aComputers, $aComputersSource) My first _ArrayDisplay is like this: Row Col0 [0] 114 [1] Desktop1 [2] Desktop2 [3] Desktop3 [4] Desktop4 ect.. [112] Desktop112 [113] Desktop113 [114] My 2nd _ArrayDisplay i like this: Row Col0 [0] 628 [1] Laptop1 [2] Laptop2 [3] Laptop3 [4] Laptop4 ect.. [626] Laptop112 [627] Laptop113 [628] My _ArrayConcatenate is like this: Row Col0 [0] 114 [1] Desktop1 [2] Desktop2 [3] Desktop3 [4] Desktop4 ect.. [112] Desktop112 [113] Desktop113 [114] [115] 628 [116] Laptop1 [117] Laptop2 [118] Laptop3 [119] Laptop4 ect.. [741] Laptop112 [742] Laptop113 [743] How can I avoid row [0] + [114] +[115] + [743]? I just want all our computers in the array. Yours sincerely Kenneth. Link to comment Share on other sites More sharing options...
water Posted February 22, 2017 Author Share Posted February 22, 2017 On the download page you will see that version 1.4.7.0 only added a html file containing all the help for the AD UDF. The AD UDF always returns a 1 based array (means: row 0 contains the row (and column) count), But _ArrayConcatenate allows to specify on which row to start concatenation (parameter $iStart). Set this value to 1 and the problem is solved My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Valnurat Posted February 22, 2017 Share Posted February 22, 2017 I tried that. The result was that only row [115] that was deleted. I still have a empty rows [114] and now of course [742], because I added 1 to _ArrayConcatenate _ArrayConcatenate($aComputers, $aComputersSource,1) Yours sincerely Kenneth. Link to comment Share on other sites More sharing options...
water Posted February 22, 2017 Author Share Posted February 22, 2017 You need to process $aComputers as well: Global $aResult[] _ArrayConcatenate($aResult, $aComputers, 1) _ArrayConcatenate($aResult, $aComputersSource, 1) _ArrayDisplay($aResult) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted February 22, 2017 Author Share Posted February 22, 2017 Example: #include <Array.au3> Global $aResult[0] Global $aComputers[] = [3, "C1", "C2", "C3"] Global $aComputersSource[] = [2, "C4", "C5"] _ArrayConcatenate($aResult, $aComputers, 1) _ArrayConcatenate($aResult, $aComputersSource, 1) _ArrayDisplay($aResult) My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Valnurat Posted February 22, 2017 Share Posted February 22, 2017 Ok. I did that and now I only have the last row. That one is empty. Yours sincerely Kenneth. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now