water Posted May 21, 2012 Author Share Posted May 21, 2012 The OU is named like this OU=HPXXXX,DC=Microsoft,DC=COM? 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...
Syed23 Posted May 21, 2012 Share Posted May 21, 2012 ok. I have a idea... can i use _AD_GetObjectsInOU() to collect the machine account details from specific OU? based on that i can find the what is the computer model if possible? In our environment we have HP laptops and compaq laptops as well. i need to collect that information using any AD function. Please let me know if i am not clear! Thanks in advance! Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font] Link to comment Share on other sites More sharing options...
water Posted May 21, 2012 Author Share Posted May 21, 2012 Sure. Specify the OU where you want to start as parameter 1 and set parameter 3 to 1 to only search one level. 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...
Syed23 Posted May 22, 2012 Share Posted May 22, 2012 Do you have an example for me? ... i tried to modify your _AD_Getallobjectsinou example... but that does not works for me.. so poor on my modifications.... Please if you don't mind can you tell me how to do that! sorry for troubling you.... Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font] Link to comment Share on other sites More sharing options...
water Posted May 22, 2012 Author Share Posted May 22, 2012 Change lineGlobal $sOU = "" ; FQDN of the OU where to startto the OU where you want to startGlobal $sOU = "OU=HPXXXX,DC=Microsoft,DC=COM" ; FQDN of the OU where to start 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...
Syed23 Posted May 22, 2012 Share Posted May 22, 2012 Change lineGlobal $sOU = "" ; FQDN of the OU where to startto the OU where you want to startGlobal $sOU = "OU=HPXXXX,DC=Microsoft,DC=COM" ; FQDN of the OU where to start Thanks for the help Water! that returns the distinguished name as complete od detail. That OU detail does not contail computer model details. What could be the reason? Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font] Link to comment Share on other sites More sharing options...
water Posted May 22, 2012 Author Share Posted May 22, 2012 It's not clear to me what you mean by "computer model details". Where is this information stored? With the computer account? The _AD_Example_GetOUTreeView script only returns the OU tree but not the contained objects. Do you want to see the objects (computers, users ...) in the OUs as well? 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...
Syed23 Posted May 22, 2012 Share Posted May 22, 2012 It's not clear to me what you mean by "computer model details". Where is this information stored? With the computer account? The _AD_Example_GetOUTreeView script only returns the OU tree but not the contained objects. Do you want to see the objects (computers, users ...) in the OUs as well?Yes if it is possible that will be good! Regarding the computer model detail.. i am using the laptop HP6910P model. i am not sure whether this details will get stored in AD. do you have any idea on this ? Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font] Link to comment Share on other sites More sharing options...
water Posted May 22, 2012 Author Share Posted May 22, 2012 (edited) Something like this? When I have a look at our AD I see no model type information stored in the computer account. Edited May 22, 2012 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...
water Posted May 22, 2012 Author Share Posted May 22, 2012 Here is the extended example code that lets you create a TreeView with all OUs + all objects in the OUs. 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...
jazzyjeff Posted June 4, 2012 Share Posted June 4, 2012 Water, I have this script, but it is not detecting the value as an array. _AD_Open() $ADGroup = _AD_RecursiveGetMemberOf(@UserName) If IsArray($ADGroup) Then _ArrayDisplay($ADGroup) EndIf _AD_Close() I have even tried this, but it doesn't bring up any display of security group membership. _AD_Open() $ADGroup = _AD_RecursiveGetMemberOf(@UserName) _ArrayDisplay($ADGroup) _AD_Close() Any ideas what's wrong? I am using the latest 1.2 version of the UDF. If I ask it to return an error code, I receive the number 1. Thanks, Jeff Link to comment Share on other sites More sharing options...
water Posted June 4, 2012 Author Share Posted June 4, 2012 Hi Jeff, your example script works fine here. Error code 1 means: "Specified user, group or computer does not exist" - Strange Do you run version 1.2.0 or version 1.2.1.0? 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...
jazzyjeff Posted June 4, 2012 Share Posted June 4, 2012 I have version 1.2.0 Link to comment Share on other sites More sharing options...
jazzyjeff Posted June 4, 2012 Share Posted June 4, 2012 I am running this script on a 64bit version of Windows 7. Is there a compatibility issue with this version of Windows and the recursive function? With my account the script does work fine, but with a user account that has only standard user rights it does not. Link to comment Share on other sites More sharing options...
water Posted June 4, 2012 Author Share Posted June 4, 2012 There is no known problem with version 1.2.0. Does the example script _AD_RecursiveGetMemberOf.au3 work for you? 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 June 4, 2012 Author Share Posted June 4, 2012 You could try to run your script as 32 bit by adding "#AutoIt3Wrapper_UseX64=n" at the top of your script. 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...
jazzyjeff Posted June 4, 2012 Share Posted June 4, 2012 Also, I have compiled it as a 32bit and 64bit App, but it doesn't make a difference either way. Link to comment Share on other sites More sharing options...
water Posted June 4, 2012 Author Share Posted June 4, 2012 Can you please check if _AD_Open returns an error? 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...
jazzyjeff Posted June 4, 2012 Share Posted June 4, 2012 _AD_Open returns a number 4. Link to comment Share on other sites More sharing options...
jazzyjeff Posted June 4, 2012 Share Posted June 4, 2012 The @extended returns a 0... Link to comment Share on other sites More sharing options...
Recommended Posts