Skip to Content
PowerShell Cookbook, 4판
book

PowerShell Cookbook, 4판

by Lee Holmes
May 2025
Beginner to intermediate
1002 pages
15h 7m
Korean
O'Reilly Media, Inc.
Content preview from PowerShell Cookbook, 4판

23장. 이벤트 로그

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

23.0 소개

이벤트 로그( )는 Windows에서 대부분의 모니터링 및 진단의 핵심을 구성합니다. 이 활동을 지원하기 위해 PowerShell은 시스템의 이벤트 로그 데이터를 쿼리하고 작업할 수 있는 Get-WinEvent cmdlet을 제공합니다. 간단한 이벤트 로그 검색 외에도 PowerShell에는 이벤트 로그를 만들고, 삭제하고, 사용자 지정하고, 이벤트 로그와 상호 작용할 수 있는 다른 많은 cmdlet도 포함되어 있습니다.

23.1 모든 이벤트 로그 나열

문제

시스템에 어떤 이벤트 로그가 존재하는지 확인하려고 합니다.

솔루션

Get-WinEvent cmdlet을 사용합니다. Get-WinEvent cmdlet은 일반 이벤트 로그 외에도 응용 프로그램 및 서비스 이벤트 로그를 지원합니다:

PS > Get-WinEvent -ListLog * | Select LogName,RecordCount

LogName                                                        RecordCount
-------                                                        -----------
Application                                                           1933
DFS Replication                                                          0
HardwareEvents                                                           0
Internet Explorer                                                        0
Key Management Service                                                   0
Media Center                                                             0
OAlerts                                                                  2
ScriptEvents                                                           424
Security                                                             39005
System                                                               55957
Windows PowerShell                                                    2865
ForwardedEvents
Microsoft-Windows-Backup                                                 0
Microsoft-Windows-Bits-Client/Ana ...
Microsoft-Windows-Bits-Client/Oper...                                 2232
Microsoft-Windows-Bluetooth-MTPEnu...                                    0
Microsoft-Windows-CAPI2/Operational
(...)

Windows 이벤트 뷰어 그래픽 사용자 인터페이스를 사용하여 이벤트 로그를 찾아보려면 Show-EventLog cmdlet을 사용합니다.

토론

Get-WinEvent cmdlet의 매개 변수는 시스템에 등록된 이벤트 로그의 목록을 생성합니다. 현재 시스템의 이벤트 로그를 지원할 뿐만 아니라 매개 변수를 제공하여 원격 시스템의 이벤트 로그와 상호 작용할 수도 있습니다. -List -ComputerName

관심 있는 이벤트 로그를 결정한 후에는 Get-WinEvent cmdlet을 사용하여 해당 로그에서 특정 항목을 검색, 필터링 및 검색할 수 있습니다. 이벤트 로그 항목을 검색하는 방법에 대한 자세한 내용은 23.2, 23.323.4의 리소스를 참조하세요.

Get-WinEvent cmdlet에 대한 자세한 내용을 보려면 Get-Help Get-WinEvent.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Linux Cookbook, 제 2판

Linux Cookbook, 제 2판

Carla Schroder
머신러닝 리스크 관리 with 파이썬

머신러닝 리스크 관리 with 파이썬

패트릭 홀, 제임스 커티스, 파룰 판데이
SDL Game Development

SDL Game Development

Shaun Mitchell

Publisher Resources

ISBN: 9798341654815