December 23rd, 2012

PowerTip: Find the Most Recent DNS Client Warnings

Doctor Scripto
Scripter

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

 

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.