Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to Get-WinEvent cmdlet #1911

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

VincentVTran
Copy link
Contributor

@VincentVTran VincentVTran commented Aug 5, 2024

Issue #, if available:

Description of changes:
According to Microsoft, Get-EventLog uses a Win32 API that is deprecated and results provided may not be accurate. Instead, it is recommended that Get-WinEvent is used. This PR changes the log fetching mechanism to use that Cmdlet. Reference: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-eventlog?view=powershell-5.1

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done

  • Ran the changes locally on a Windows instance
  • Verified the CSV files based on RecordID number. Also ensured all the necessary fields are available (
    See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.

Test Result

Old Kubelet CSV

image

New Kubelet CSV

image

@oldschool-engineer
Copy link
Member

Looks good to me! Thanks!

@cartermckinnon cartermckinnon merged commit 62c3103 into awslabs:main Aug 6, 2024
@VincentVTran VincentVTran deleted the Upgrade-to-WinEvent branch August 6, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants