Active Directory management & automation

View AD Operations Performed via Adaxes

All operations performed in Active Directory via Adaxes are logged in the Adaxes service log. This allows you to view who performed what operations, when, on what objects, from what hosts, etc. In this tutorial, you will learn how to view all operations performed by a specific user, all operations performed on a specific AD object, and all operations performed in Active Directory via Adaxes.

To view all operations performed via Adaxes:

Launch Adaxes Administration Console, expand your Adaxes service and click Logging.

Selecting Logging

The log of operations performed in Active Directory will be shown in the Result Pane (located on the right).

Viewing the Service Log

To view all operations performed by a specific user:

Right-click this user, point to All Tasks and click Management Activity.

Viewing Management Activity

To view all operations performed on a specific AD object:

Right-click this object, point to All Tasks and click Management History.

Viewing Management History

Get Adaxes Log Records Using Script

It is also possible to access the Adaxes service log with the help of a script (using the Adaxes ADSI provider). The following VB script reads records from the Adaxes log and saves them into a file:

	AdaxesServiceHost = "localhost"
	BackupFile = "Log.txt"
	NumberOfDaysToLog = 0
	' If the username and password are empty, the account of the user under which
	' the script is running will be used.
	Username = Empty ' Example: DOMAIN\username,
	Password = Empty
	' Open the Adaxes namespace
	Set ns = GetObject("Adaxes:")
	' Connect to the Adaxes service
	Set admService = ns.GetService(AdaxesServiceHost, Username, Password)
	' Get the ADsPath of the Adaxes Service Log
	serviceLogPath = admService.Backend.GetConfigurationContainerPath("ServiceLog")
	' Bind to the Service Log
	Set admServiceLog = admService.OpenObject(serviceLogPath, Username, Password, 0)
	' Get the General Log
	Set admGeneralLog = admServiceLog.GeneralLog
	If NumberOfDaysToLog <> 0 Then
		admGeneralLog.StartDateTime = DateAdd("d", -NumberOfDaysToLog, Now())
		admGeneralLog.EndDateTime = Now()
	End If
	' Get the Adaxes log
	Set admLog = admGeneralLog.Log
	Set admRecords = admLog.GetPage(0)
	recordsCount = admRecords.Count
	' Open the file and write all the log records into it
	Set fso = CreateObject("Scripting.FileSystemObject")
	Set textStream = fso.OpenTextFile(BackupFile, 2, True)
	For index = 0 To recordsCount - 1
		Set admRecord = admRecords.GetObject(index)
		textStream.WriteLine "Start Time: " & admRecord.StartTime
		textStream.WriteLine "Completion Time: " & admRecord.CompletionTime
		textStream.WriteLine "Initiator: " & admRecord.Initiator.Name
		textStream.WriteLine "Target Object GUID: " & admRecord.TargetObjectGuid
		textStream.WriteLine "Operation Description: " & admRecord.Description
For more details, see Accessing Log Records.
? Waiting

Progress status: Checking...