Sign in to follow this  
Followers 0

Active Directory Example Scripts

73 posts in this topic

Posted (edited)

I've written some scripts based on the Active Directory UDF (for download please see signature).
In this thread I would like to share some of them.

ADAudit
On one/multiple big sheet(s) you get users (columns) and groups (rows). The list is sorted descending by number of members so you get the users with most groups and the groups with most members on top of the page. You can filter by (multiple) samaccountname(s), department or you can create your own LDAP query filter. You can filter the resulting list of groups using a Regular Expression.

post-7903-0-81833800-1295605611_thumb.gi
ADAudit.zip

History:

2010-02-24: Added version 1.0. Downloads: 181
2010-04-01: Added version 1.1 with bug fixes. An array was not deleted when repeatedly calling a report. Downloads: 77
2010-05-24: Added version 1.2 with bug fixes. The array with group descriptions wasn't checked for entries. Downloads: 24
2010-05-27: Added version 1.3 with bug fixes. Fixed a bug in version 1.2 and introduced a new one :mellow:. Downloads: 134
2010-07-29: Added version 1.4 with performance improvements. Runs much, much faster now! Office 2007 support still missing - please be patient. Downloads: 171
2010-11-05: Added version 1.5 with Office 2007 support (> 256 columns) plus all improvements proposed by supersonic.
2010-11-07: Reloaded the zip-file. It now contains the 1.5 code



_AD_Example_GetOUTreeView
This example script displays all OUs in a TreeView. You can specify the FQDN of the OU where to start if you just want to see a subset.

_AD_Example_GetOUTreeView.zip

History:

2011-07-17: Added version 1.0. Initial release. Downloads: 81
2011-07-18: Added version 1.1. Now returns information about the selected OU (name and FQDN). Downloads: 621
2012-05-18: Added version 1.2. Added 3 new parameters to select object classes (computer, user, group ..) to display a count right to the OU name



ADAT - Active Directory Administration Tool
ADAT is a tool to simplify common AD administration tasks. Every administration task has its own tab. It is easy to add new functions (tabs) to the tool. Some often used functions are already available: list users, computers, OUs. File ADAT.ini can be customized to hold the AD logon information if necessary. By default the user running the script connects to the AD.
Check this >post for some screenshots.

ADAT.zip

History:

2012-02-16: Added version 1.0. Initial release



ADCU - Active Directory Compare Users
ADCU displays two users and their group membership in two listviews. You can filter and export the data to Excel, Outlook mail and the clipboard.
Before running the script you need to change check_access.au3 and AD-Tools.ini

ADCU.zip
post-7903-0-55507100-1353326171_thumb.pn

History:

2012-11-19: Added version 1.0. Initial release



ADCG - Active Directory Compare Groups
ADGU displays two groups and their direct members in two listviews. You can filter and export the data to Excel, Outlook mail and the clipboard.
Before running the script you need to change check_access.au3 and AD-Tools.ini

ADCG.zip
post-7903-0-48403200-1354277524_thumb.pn

History:

2012-11-30: Added version 1.0. Initial release

Examples by other users

Active Directory Tool: UserInfo by Marc. >Download added 2013-07-29.

Edited by water
232showtime and redrider81 like this

Share this post


Link to post
Share on other sites



Posted

Good sample. But it will report and error in line 237: Subscript used with non-Array variable

For $j = 1 To $aDescription[0][0]

I think maybe need some check on the array first. :idea:

Share this post


Link to post
Share on other sites

Posted (edited)

I see. Will incorporate some checks and post the result.

This only happens when none of your groups has a description.

Edited by water

Share this post


Link to post
Share on other sites

Posted

Version 1.2 with bug fixes has been released.

Share this post


Link to post
Share on other sites

Posted

I think line 245 should be endif, not elseif

Share this post


Link to post
Share on other sites

Posted

I think line 245 should be endif, not elseif

You are right! I removed one bug and introduced a new one :mellow:

Post #1 has been changed and now contains the "error free" script.

Share this post


Link to post
Share on other sites

Posted

But it's good chance for you since our company have a complicated AD environment. :mellow:

Share this post


Link to post
Share on other sites

Posted (edited)

Hi water!

Nice script, very useful. :P

Here're some suggestions to improve it:

1. Script line 196 to 200: Instead of generally truncating at more than 256 groups/users you could check for the currently used Excel version

by simply calling '$oExcel.Application.Version' (8 = Microsoft Excel 97, 9 = 2000, 10 = 2002/XP, 11 = 2003, 12 = 2007, 14 = 2010).

2. Script line 222: Instead of checking against '@OSLang' it's better to use 'oExcel.LanguageSettings.LanguageID($msoLanguageIDUI)'.

The variable '$msoLanguageIDUI' should have a value of '0x2'. If you like, see http://msdn.microsoft.com/en-us/library/dd787731.aspx and

http://msdn.microsoft.com/en-us/library/aa170976.aspx for reference.

3. Script line 224 and 228: Since Excel 2007 more then 256 columns are available. To make use of it in your script, please see

http://www.autoitscript.com/forum/index.php?showtopic=115665 for another solution to convert numbers into MS Excel column letter(s).

The second function is indeed the better one! :mellow:

Greets,

-supersonic.

Edited by supersonic

Share this post


Link to post
Share on other sites

Posted

Hi supersonic,

thanks for the suggestions!

As soon as I get my hands on a Windows 7 System with the latest Office version I will upgrade the example script.

Water

Share this post


Link to post
Share on other sites

Posted (edited)

Version 1.4 with performance improvements has been released.

Office 2007 support still missing - please be patient.

Edited by water

Share this post


Link to post
Share on other sites

Posted

Hi water!

Greate performance improvements, but I noticed some problems.

When querying "many" (350+) users or groups, my Excel (2007) sheet remains blank.

After changing back to "_ExcelWriteSheetFromArray()" it works without a problem...

When querying less (~25-50) users or groups "$oExcel.Transpose()" works fine.

Just to let you know.

Greets,

-supersonic.

Share this post


Link to post
Share on other sites

Posted (edited)

Thanks for the heads up!

Edited by water

Share this post


Link to post
Share on other sites

Posted

Version 1.5 has been released.

Office 2007 support (> 256 columns) plus everything supersonic proposed is now included.

Share this post


Link to post
Share on other sites

Posted

Please reload the 1.5 zip file. It contained the old 1.4. code :graduated:

This bug has beend fixed.

Share this post


Link to post
Share on other sites

Posted

humm nice post water :unsure:

i've seen the thumbnails and look nice,

also i downloaded the AD.au3 and put it in the include folder,

i've als treid out the example but got a couple error mesages :S

i've treid this on a (dutch)win XP machine in a test area and can't even compile it whitout errors....

Did i do something wrong?

C:\Program Files\AutoIt3\Include\AD.au3(1618,59) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$sAD_Now = _Date_Time_SystemTimeToDateTimeStr($sAD_Now, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(1761,69) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$sAD_DTExpire = _Date_Time_SystemTimeToDateTimeStr($sAD_DTExpire, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(1780,78) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_FQDN[$iAD_Count][1] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(1782,78) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_FQDN[$iAD_Count][2] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(1932,93) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_ObjectProperties[$iCount3][1] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp3, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(2877,71) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_PwdInfo[10] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp2, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(2881,70) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_PwdInfo[8] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp2, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(2884,70) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_PwdInfo[9] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp2, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3753,72) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$sAD_DTEExpire = _Date_Time_SystemTimeToDateTimeStr($sAD_DTEExpire, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3760,75) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$sAD_DTEExpire = _Date_Time_SystemTimeToDateTimeStr($sAD_DTEExpireUTC, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3770,75) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$sAD_DTSExpire = _Date_Time_SystemTimeToDateTimeStr($sAD_DTSExpireUTC, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3790,77) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_FQDN[$iAD_Count][1] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3792,77) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_FQDN[$iAD_Count][2] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3988,68) : WARNING: $__WINAPICONSTANT_FORMAT_MESSAGE_FROM_SYSTEM: possibly used before declaration.

_WinAPI_FormatMessage($__WINAPICONSTANT_FORMAT_MESSAGE_FROM_SYSTEM,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\ADAudit.au3(27,10) : ERROR: can't open include file <ExcelCOM_UDF.au3>

#include <ExcelCOM_UDF.au3>

~~~~~~~~~^

C:\~\Desktop\ADAudit.au3(217,44) : WARNING: $xlCalculationManual: possibly used before declaration.

$oExcel.Calculation = $xlCalculationManual

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\Desktop\ADAudit.au3(269,70) : WARNING: $xlVAlignTop: possibly used before declaration.

$oExcel.Activesheet.Range("A1:B2" ).VerticalAlignment = $xlVAlignTop

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\Desktop\ADAudit.au3(283,29) : WARNING: $xlContinuous: possibly used before declaration.

.LineStyle = $xlContinuous

~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\Desktop\ADAudit.au3(284,29) : WARNING: $xlAutomatic: possibly used before declaration.

.ColorIndex = $xlAutomatic

~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\Desktop\ADAudit.au3(293,47) : WARNING: $xlCalculationAutomatic: possibly used before declaration.

$oExcel.Calculation = $xlCalculationAutomatic

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3988,68) : ERROR: $__WINAPICONSTANT_FORMAT_MESSAGE_FROM_SYSTEM: undeclared global variable.

_WinAPI_FormatMessage($__WINAPICONSTANT_FORMAT_MESSAGE_FROM_SYSTEM,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\Desktop\ADAudit.au3(176,27) : ERROR: _ExcelBookNew(): undefined function.

$oExcel = _ExcelBookNew(0)

~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\Desktop\ADAudit.au3(181,29) : ERROR: _ExcelBookClose(): undefined function.

_ExcelBookClose($oExcel, 0)

~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\Desktop\ADAudit.au3(267,140) : ERROR: _ExcelWriteCell(): undefined function.

_ExcelWriteCell($oExcel, "created by: " & @UserName & @LF & @YEAR & "/" & @MON & "/" & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC, 1, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\Desktop\ADAudit.au3(271,73) : ERROR: _ExcelSortExtended(): undefined function.

_ExcelSortExtended($oExcel, "B1", 3, 1, $Dim1, $Dim2, 2, 0, False, 1, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\Desktop\ADAudit.au3 - 19 error(s), 6 warning(s)

Share this post


Link to post
Share on other sites

Posted (edited)

hummm sorry found out that i dint had ExcelCOM_UDF.au3 included... :S

but afther included it in mijn include folder i still got error messages :S

hopfuly somebody know something about this problem....

it looks realy nice this UDF :unsure:

C:\Program Files\AutoIt3\Include\AD.au3(1932,93) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_ObjectProperties[$iCount3][1] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp3, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(2877,71) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_PwdInfo[10] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp2, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(2881,70) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_PwdInfo[8] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp2, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(2884,70) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_PwdInfo[9] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp2, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3753,72) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$sAD_DTEExpire = _Date_Time_SystemTimeToDateTimeStr($sAD_DTEExpire, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3760,75) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$sAD_DTEExpire = _Date_Time_SystemTimeToDateTimeStr($sAD_DTEExpireUTC, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3770,75) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$sAD_DTSExpire = _Date_Time_SystemTimeToDateTimeStr($sAD_DTSExpireUTC, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3790,77) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_FQDN[$iAD_Count][1] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3792,77) : ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

$aAD_FQDN[$iAD_Count][2] = _Date_Time_SystemTimeToDateTimeStr($sAD_Temp, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\Date.au3(2797,60) : REF: definition of _Date_Time_SystemTimeToDateTimeStr().

Func _Date_Time_SystemTimeToDateTimeStr(ByRef $tSystemTime)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3988,68) : WARNING: $__WINAPICONSTANT_FORMAT_MESSAGE_FROM_SYSTEM: possibly used before declaration.

_WinAPI_FormatMessage($__WINAPICONSTANT_FORMAT_MESSAGE_FROM_SYSTEM,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\ExcelCOM_UDF.au3(1292,132) : WARNING: $oFound possibly not declared/created yet

$oFound = $oExcel.Selection.Find($sFindWhat, $oExcel.ActiveCell, Default, $iWholeOrPart, Default, Default, $fMatchCase, Default)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\ExcelCOM_UDF.au3(1273,38) : WARNING: $sFound: declared, but not used in func.

Local $iCount, $sA1, $sR1C1, $sFound,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\ExcelCOM_UDF.au3(2682,34) : WARNING: $iCurrCol possibly not declared/created yet

$iCurrCol = $iStartColumn

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\Include\AD.au3(3988,68) : ERROR: $__WINAPICONSTANT_FORMAT_MESSAGE_FROM_SYSTEM: undeclared global variable.

_WinAPI_FormatMessage($__WINAPICONSTANT_FORMAT_MESSAGE_FROM_SYSTEM,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\~\Desktop\ADAudit.au3 - 14 error(s), 4 warning(s)

Edited by FMS

Share this post


Link to post
Share on other sites

Posted

ERROR: _Date_Time_SystemTimeToDateTimeStr() called with wrong number of args.

This error message is caused by an older version of AutoIt. You need at least 3.3.6.0

Share this post


Link to post
Share on other sites

Posted

YESZZZ!!!!!!!!!! updated it and works like a charm ;)

thnx 4 that.... now explorer what we can do whit it :unsure:

maybe along the way there pops up an idea for something :>

Share this post


Link to post
Share on other sites

Posted

Glad it works!

We send this reports to our departments to let them check their permissions.

For our identity and access management it is useful because it shows who has similar permissions.

Share this post


Link to post
Share on other sites

Posted

Version 1.1.0 has been released.

Please test before using in production!

For download please see my signature.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0