To Get the Windows Events you must mention Computer name, Host name, filters, event ID, as mention below.
Ex:- (Get-WinEvent -ComputerName "SPHOSTNAME" -LogName "Application" -MaxEvents 1 -FilterXPath "*[System[TimeCreated[@SystemTime>'$t1']][EventID=6005]][EventData[Data='Sens' and Data='Logoff']]")|fl
Ex:- (Get-WinEvent -ComputerName "SPHOSTNAME" -LogName "Application" -MaxEvents 1 -FilterXPath "*[System[TimeCreated[@SystemTime>'$t1']][EventID=6005]][EventData[Data='Sens' and Data='Logoff']]")|fl