feffrey Posted June 13, 2012 Posted June 13, 2012 I have a excel chart with user names in a column. I am trying to write a script that will read through that column, find all security groups that user has, and write that information down into another column in the same row. I’ve written a few simple scripts with autoit but nothing dealing with arrays or files.
Moderators JLogan3o13 Posted June 13, 2012 Moderators Posted June 13, 2012 (edited) Hi, feffrey, welcome to the forum. I would start with Water's great AD UDF The AD_GetUserGroups function should be a place to start. Edited June 13, 2012 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
water Posted June 13, 2012 Posted June 13, 2012 To list all groups a user is a member of can be done using my AD UDF, function _AD_GetUserGroups.Or you can try example script ADAudit which can be found 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
feffrey Posted June 14, 2012 Author Posted June 14, 2012 (edited) Thanks for the link _AD-GetUser_Groups looks like it will work good I tried the below however it keeps returning with the logged in user group's, not the user I specified. Am I calling the script wrong? #include <AD.au3> #include <_AD_GetUserGroups.au3> _AD_GetUserGroups("bob") Edited June 14, 2012 by feffrey
water Posted June 14, 2012 Posted June 14, 2012 (edited) Am I calling the script wrong?Yes. It should look like this:#include <AD.au3> #include <array.au3> _AD_Open() $aGroups = _AD_GetUserGroups("bob") _ArrayDisplay($aGroups) _AD_Close() Edited June 14, 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
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