ฉันเป็นผู้ดูแลโดเมนที่เทียบเท่าฉันได้ลองใช้งานในคอนโซลยกระดับ (คลิกขวา> เรียกใช้ในฐานะผู้ดูแลระบบ) และฉันได้รับข้อผิดพลาดอย่างต่อเนื่องขณะดำเนินการ
get-winevent -logname application | where {$_.message -match "Faulting application"} | `
select TimeCreated,message
ฉันจะได้ผลลัพธ์สามบรรทัดจากนั้น
Get-WinEvent : Attempted to perform an unauthorized operation.
At line:1 char:13 Get-WinEvent : Attempted to perform an unauthorized operation.
+ CategoryInfo : NotSpecified: (:) [Get-WinEvent], UnauthorizedAccessException
+ FullyQualifiedErrorId : Attempted to perform an unauthorized operation.,Microsoft.PowerShell.Commands.GetWinEventCommand
สิ่งนี้ดูเหมือนจะเป็นการพัฒนาใหม่ไม่เคยมีข้อผิดพลาดมาก่อน
มันสอดคล้อง - ถ้าฉันเรียกใช้ด้วย -computername จากเซิร์ฟเวอร์อื่นรูปแบบยังคงเป็น 3 สายตกลงจากนั้นข้อผิดพลาด X จากนั้น 5 สายตกลง ฯลฯ
get-help get-winevent
Note: [...] And, it requires the Microsoft .NET Framework 3.5 or a later version.
คุณตอบสนองความต้องการนี้หรือไม่?
(gwmi Win32_OperatingSystem).Version
และGet-Host