PowerTip: Find the Most Recent DNS Client Warnings

Doctor Scripto

Summary: Use Windows PowerShell to find the most recent DNS client warning messages.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find the five most recent DNS client warning messages?

Hey, Scripting Guy! Answer Use the Get-EventLog cmdlet, choose the system log, and then specify a source of *dns*. Make sure you retrieve warning messages and select the number of recent messages to retrieve. The following retrieves five of the most recent DNS client warning messages from the system event log.

Get-EventLog -LogName system -Source *dns* -EntryType warning -Newest 5

 

0 comments

Discussion is closed.

Feedback usabilla icon