How to save event viewer logs?

Salem Mubarak 0 Reputation points
2024-07-03T09:16:49.13+00:00

Dears,
I want to save all the logs of users in the Active Directory to a file, including username/computer name/OU/data/time, so that I can keep it for future adapting.

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,631 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yanhong Liu 11,860 Reputation points Microsoft Vendor
    2024-07-04T03:00:34.5133333+00:00

    Hello Salem Mubarak,

    Thank you for posting in Q&A forum.

    Unfortunately, from my searches, there is no built-in Group Policy or registry setting to save all user logs in Active Directory to a file. However, you can create a custom solution using Powershell scripts. PowerShell provides powerful AD cmdlets that can easily query and export details of AD objects.

    You can create a PowerShell script that collects detailed information about all users in Active Directory, including username, computer name (if a workstation member), OU, date and time, and outputs the results to a CSV file.

    If you need help with this, I suggest you post a new question on the forum with the PowerShell tag specifically to discuss how to create a script to collect all user log information and save it to a file.

    I hope the information above is helpful.

    Best Regards,

    Yanhong Liu

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.