LevT
Platinum Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору PS D:\_WRK\winevent> .\script.ps1 -logname 'System' -arguments '.' | ogv get-winevent : No events were found that match the specified selection criteria. At D:\_WRK\winevent\script.ps1:52 char:11 + $events = get-winevent -log $logname -filterxp $flt -max $maxevents + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: ( [Get-WinEvent], Exception + FullyQualifiedErrorId : NoMatchingEventsFound,Microsoft.PowerShell.Commands.GetWinEventCommand You cannot call a method on a null-valued expression. At D:\_WRK\winevent\script.ps1:54 char:1 + $sel = (([xml[]]$events.toxml()).event.eventdata.data.name -match $ar ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull select : The value of a parameter was null; one of the following types was expected: {System.String, System.Management.Automation.ScriptBlock}. At D:\_WRK\winevent\script.ps1:71 char:9 + $events|select $sel|sort timecreated,id,level + ~~~~~~~~~~~ + CategoryInfo : InvalidArgument: ( [Select-Object], NotSupportedException + FullyQualifiedErrorId : DictionaryKeyUnknownType,Microsoft.PowerShell.Commands.SelectObjectCommand PS D:\_WRK\winevent> .\script.ps1 -logname 'System' -eventid 1014 | ogv cmdlet Add-Member at command pipeline position 1 Supply values for the following parameters: Name: PS D:\_WRK\winevent> .\script.ps1 -logname 'System' -eventid @(1014) -arguments '.' | ogv cmdlet Add-Member at command pipeline position 1 Supply values for the following parameters: Name: PS D:\_WRK\winevent> (Сижу на сервере, где статистика загрузки не собиралась, т.е. исходного лога нет) | Всего записей: 17168 | Зарегистр. 14-10-2001 | Отправлено: 13:44 20-02-2019 | Исправлено: LevT, 16:15 20-02-2019 |
|