Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Active Directory Example Scripts


  • Please log in to reply
71 replies to this topic

#1 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 24 February 2010 - 09:58 AM

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.

ADAudit.gif
Attached File  ADAudit.zip   5.32KB   3016 downloads

History:

Spoiler


_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.

Attached File  _AD_Example_GetOUTreeView.zip   2.17KB   1222 downloads

History:
Spoiler


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.

Attached File  ADAT.zip   6.27KB   1645 downloads

History:
Spoiler


ADCU - Shows two users in ListViews and lets you compare and export the group membership
ADCU shows 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

Attached File  ADCU.zip   223.61KB   920 downloads
ADCU Screenshot.png

History:
Spoiler


ADCG - Shows the members of two groups in ListViews and lets you compare and export the members
ADGU shows 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

Attached File  ADCG.zip   224.55KB   744 downloads
ADCG.png

History:
Spoiler

 

Examples by other users

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


Edited by water, 29 July 2013 - 06:18 PM.

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki








#2 LiHang

LiHang

    Seeker

  • Active Members
  • 13 posts

Posted 21 May 2010 - 08:43 AM

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:

#3 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 21 May 2010 - 09:25 AM

I see. Will incorporate some checks and post the result.
This only happens when none of your groups has a description.

Edited by water, 24 May 2010 - 10:56 AM.

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki


#4 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 24 May 2010 - 10:55 AM

Version 1.2 with bug fixes has been released.

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki


#5 LiHang

LiHang

    Seeker

  • Active Members
  • 13 posts

Posted 27 May 2010 - 08:07 AM

I think line 245 should be endif, not elseif

#6 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 27 May 2010 - 08:16 AM

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.

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki


#7 LiHang

LiHang

    Seeker

  • Active Members
  • 13 posts

Posted 27 May 2010 - 02:11 PM

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

#8 supersonic

supersonic

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 466 posts

Posted 13 June 2010 - 01:28 PM

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, 14 June 2010 - 05:41 AM.


#9 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 13 June 2010 - 03:40 PM

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

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki


#10 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 29 July 2010 - 10:33 AM

Version 1.4 with performance improvements has been released.
Office 2007 support still missing - please be patient.

Edited by water, 29 July 2010 - 10:34 AM.

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki


#11 supersonic

supersonic

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 466 posts

Posted 10 August 2010 - 09:19 AM

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.

#12 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 10 August 2010 - 10:59 AM

Thanks for the heads up!

Edited by water, 05 November 2010 - 09:52 AM.

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki


#13 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 05 November 2010 - 09:48 AM

Version 1.5 has been released.
Office 2007 support (> 256 columns) plus everything supersonic proposed is now included.

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki


#14 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 07 November 2010 - 10:51 AM

Please reload the 1.5 zip file. It contained the old 1.4. code :graduated:
This bug has beend fixed.

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki


#15 FMS

FMS

    Prodigy

  • Active Members
  • PipPipPip
  • 157 posts

Posted 11 May 2011 - 10:21 AM

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)


as finishing touch god created the dutch


#16 FMS

FMS

    Prodigy

  • Active Members
  • PipPipPip
  • 157 posts

Posted 11 May 2011 - 10:30 AM

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, 11 May 2011 - 12:01 PM.

as finishing touch god created the dutch


#17 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 11 May 2011 - 11:09 AM

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

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki


#18 FMS

FMS

    Prodigy

  • Active Members
  • PipPipPip
  • 157 posts

Posted 11 May 2011 - 11:29 AM

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 :>

as finishing touch god created the dutch


#19 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 11 May 2011 - 11:35 AM

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.

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki


#20 water

water

    ?

  • MVPs
  • 14,954 posts

Posted 17 September 2011 - 10:28 AM

Version 1.1.0 has been released.

Please test before using in production!

For download please see my signature.

UDFs:
Active Directory (2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:

ADO - Wiki





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users