This may have been asked/answered before, but I could not locate it in the search option.
I have a simple "Event Log" script that works in Server 2008 R2, but not Server 2008. Both Servers have default PS installations (V2):
$yesterday = (Get-Date) – (New-TimeSpan -Day 1)
Error in Server 2008 (non R2):
Get-WinEvent : The parameter is incorrect
Looks like it may be a bug in that version of the OS (or some incompatibility with that cmdlet, at any rate, which changed as of 2008 R2). Found this article for the exact same problem description: https://social.technet.microsoft.com/Forums/windowsserver/en-US/fd147c9a-fb02-45dc-8c5a-b6f5a9bf7ab0/getwinevent-filterhashtable-on-windows-2008-x64?forum=winserverpowershell
Unfortunately the link to the Connect bug from that thread doesn't work anymore, and I haven't been able to find more details anywhere else.
You must be logged in to reply to this topic.