Hello
I'm trying to use this feature for reporting across LAN on a Server 2003 estate.
I understand the date conversion, but can't get my results to filter for today only. It seems that Get-Date does not work with WMI.
This is what I have so far (the type of event is not really relevent, this is just an example as the logic will be used for many different reports if it is possible)...
$Query = Get-WMIObject Win32_NTLogEvent -Filter "logfile='application' and sourcename='symantec antivirus'"
$Query |
Select @{Name="LoggedOn";Expression={$_.ConvertToDateTime($_.TimeWritten)}},LogFile,SourceName
Hope you can help me. I like PowerShell but this has been very annoying.
Thanks in advance...