PS C:\Users\79128> Get-WinEvent -FilterHashtable @{LogName='System'; StartTime=(Get-Date).AddDays(-14)} -ErrorAction SilentlyContinue |
Where-Object { $_.Message -match 'ds_srvd|ds_slave_pgsql|ds_local_pgsql|postgres|pgsql' } |
Select-Object TimeCreated, Id, LevelDisplayName, Message |
Format-List | Out-File "$env:USERPROFILE\Desktop\pgsql_events.txt" -Width 300
Out-File : Не удалось найти часть пути "C:\Users\79128\Desktop\pgsql_events.txt".
строка:4 знак:17
+ ... rmat-List | Out-File "$env:USERPROFILE\Desktop\pgsql_events.txt" -Wid ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Out-File], DirectoryNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand