none
Lost/blocked WMI events RRS feed

  • Question

  • Hi,

    I'm trying to indicate a WMI event from within NDIS miniport driver, following this NDIS blog post. Specifically, I register to a media connect indication: 

    $Event = Register-WMIEvent -Namespace rootwmi -Class MSNdis_StatusMediaConnect -Action { 
            Write-Host $(Get-Date), $Event.SourceEventArgs.NewEvent.InstanceName 
    }

    (This is the exact copy of the code snippet posted in the blog).

    When I execute it on Win7 machine it works fine, however on WinServer2012R2 I don't get any result. WMI log doesn't have any trace of the media connect event (neither in Win7 nor in 2012R2).

    Will appreciate any insight on this.

    Monday, January 16, 2017 11:51 AM

All replies

  • A small typo there. Replace "rootwmi" to root\wmi.

    Works for me on Win8.1  (not tested on Server)

    -- pa


    • Edited by Pavel A Monday, January 16, 2017 2:51 PM
    Monday, January 16, 2017 2:51 PM
  • A small typo there. Replace "rootwmi" to root\wmi.

    Works for me on Win8.1  (not tested on Server)

    -- pa


    Yep, the root\wmi typo seems to be ubiquitous in NDIS blogs for some reason :)

    I replaced it, not getting any error but no output as well.

    Monday, January 16, 2017 3:39 PM
  • Maybe you have a wrong powershell version there? Accordibg to the blog should be >=2

    Type "get-host".

    -- pa

    Monday, January 16, 2017 3:44 PM
  • Maybe you have a wrong powershell version there? Accordibg to the blog should be >=2

    Type "get-host".

    -- pa

    It's 4...
    Monday, January 16, 2017 6:52 PM