Hi , could you help me with script I need to take event log only today, I try to do that :
get-winevent -logname "Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational" -After ([datetime]::Today)| where {$_.eventID -eq 1149} | Sort-Object index -Descending | select -first 1
but I get error Get-WinEvent : A parameter cannot be found that matches parameter name 'After'.
please could you help me , thank you