Quantcast
Channel: powerevents Discussions Rss Feed
Viewing all articles
Browse latest Browse all 15

New Post: A plea for help using PowerEvents…I am almost there!

$
0
0

Per recommndation I took the parameter out of the equation but that was not the issue.

(I have sent Trevor a message offline) but it seem to have something to do with

The code that calls WmiEventConsumer Cmdlet...this function is defined in New-WmiEventConsumer.ps1

## Line 178

  ${ComputerName}='localhost'

## Line 622

    # Create a new instance of CommandLineEventConsumer
    ${NewConsumer}= ([wmiclass]"\\${ComputerName}\root\subscription:CommandLineEventConsumer").CreateInstance()
    ${NewConsumer}.{MachineName} =${ComputerName}

When I compared a CommandLineEventConsumer compiled using MOF rather than PowerEvents I noticed that this property was <empty> rather than 'localhost'. 

Digging deeper at the other standard event consumer classes "CommandLineEventConsumer" is the only one setting machine name...the others are not and they have been working all along for me....

When I changed this property in WMI from "localhost" to <empty> the event started working.

So I am and drawing the conclusion there is something wrong with setting this property to localhost (at least on my domain)

boy did I learn a few things debugging this...

Keep up the good work...this is good stuff

Details and bickering with other folks... 

http://social.technet.microsoft.com/Forums/en/winserverManagement/thread/a2f2c922-10f7-4879-b935-d94ed88062ec

http://social.technet.microsoft.com/Forums/en/ITCG/thread/72622438-226e-4a0a-8e81-f52446d6b3b6

Repeat mostly

http://social.technet.microsoft.com/Forums/en/winserverpowershell/thread/18c5bd58-9405-42e1-9c00-d42ffcb9ff4b

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 15

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>