October 18th, 2014

PowerTip: Find Errors Related to Update-Help

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find errors related to Update-Help.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find if Update-Help is completing successfully on my computer?

Hey, Scripting Guy! Answer Use the Get-WinEvent cmdlet and search Windows PowerShell logs for event 4103 and a status level of 2 (error).
           You can narrow the results by adding a start time. When you find the events, use Select-Object and the 
           –ExpandProperty parameter to expand the message field. Here is a command that looks for errors beginning on
           Sept. 29, 2014 (this is a one-line command that wrapped for readability):

Get-WinEvent -FilterHashtable @{
providername="*powershell*";Level=2;StartTime="9/29/14";ID=4103}

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.