locked
Does Get-WinEvent or Get-EventLog use WMI? RRS feed

  • Question

  • Does Get-WinEvent or Get-EventLog use WMI to query the systems? I'm getting WMI errors in the event log that started randomly and didn't know if these could be the culprits? Script has been running fine with no WMI event log errors until recently. 

    Thanks

    Wednesday, March 1, 2017 4:24 PM

Answers

  • Your question is very vague.  If you want event log errors the use Get-WinEvent.

    For WMI issues you will need to post in the forum for your OS to discover what is wrong and how to fix it iff a fiz is needed.


    \_(ツ)_/

    • Marked as answer by craig_jb Wednesday, March 8, 2017 2:18 PM
    Wednesday, March 1, 2017 6:09 PM

All replies

  • Your question is very vague.  If you want event log errors the use Get-WinEvent.

    For WMI issues you will need to post in the forum for your OS to discover what is wrong and how to fix it iff a fiz is needed.


    \_(ツ)_/

    • Marked as answer by craig_jb Wednesday, March 8, 2017 2:18 PM
    Wednesday, March 1, 2017 6:09 PM
  • Thanks for the response, the issue ending up being caused by another script that was using Win32_Product. It was causing an abundance of MsiInstaller events in the Application logs every time it ran. If anyone else is experiencing this issue, please refer to this page.

    https://support.microsoft.com/en-us/help/974524/event-log-message-indicates-that-the-windows-installer-reconfigured-all-installed-applications

    Wednesday, March 8, 2017 2:23 PM
  • That is an old KB and is not completely correct.  It is still a bad idea to run Win32_Product very often because it does add entries to the log which is a byproduct of the Installer.

    This has nothing to do with any WMI errors you may have been getting.  As I noted above, your question is too vague.  What errors are you getting?


    \_(ツ)_/

    Wednesday, March 8, 2017 2:47 PM
  • I would recommend querying the registry anyway, like the script in this article:

    Windows IT Pro - Auditing 32-Bit and 64-Bit Applications with PowerShell


    -- Bill Stewart [Bill_Stewart]

    Wednesday, March 8, 2017 5:57 PM