小编use*_*162的帖子

为什么我在使用 Powershell get-winevent 时会收到未经授权的错误?

我是域管理员,我尝试在提升的控制台中运行(右键单击> 以管理员身份运行),并且在执行时始终出现错误

get-winevent -logname application | where {$_.message -match "Faulting application"} | `
                                    select TimeCreated,message
Run Code Online (Sandbox Code Playgroud)

我会得到三行结果,然后

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
Run Code Online (Sandbox Code Playgroud)

这似乎是一个新的发展,以前没有遇到过这些错误。

它是一致的 - 如果我从另一台服务器使用 -computername 运行它,模式仍然是 3 OK 行,然后是 X 错误,然后是 5 OK 行,等等。

powershell user-accounts

10
推荐指数
1
解决办法
1万
查看次数

标签 统计

powershell ×1

user-accounts ×1