运行 Get-EventLog 时看不到 CommandLine 属性

问题描述 投票:0回答:1

我正在运行此命令:

Get-Eventlog -LogName Security -ComputerName GLOWING-GALAXY -InstanceId 4688 -Newest 3 | Select-Object CommandLine

但这就是我得到的

"CommandLine
-----------

"

但是命令行属性中没有显示任何内容。

我正在以管理员身份运行 Powershell。当我实际以相同的管理员用户身份登录计算机并运行相同的命令时,CommandLine 的属性值仅列为“C”

powershell
1个回答
0
投票

这是启用进程创建审核后如何获取它,但在 win 10 22h2 中命令行对我来说也是 $null 。

get-winevent @{logname='security';id=4688} -maxevents 3 | 
  % { [xml]$xml = $_.toxml(); $xml.event.eventdata.data } | 
  ? name -match 'newprocessname|commandline'

Name           #text
----           -----
NewProcessName C:\Program Files (x86)\Intel\Platform Manager\Runtime\EMAAjaxServer\EMAAjaxServer.exe
CommandLine
NewProcessName C:\Program Files (x86)\Intel\Platform Manager\Runtime\EMAManageabilityServer\EMAManageabilityServer.exe
CommandLine
NewProcessName C:\Program Files (x86)\Intel\Platform Manager\Runtime\EMASwarmServer\EMASwarmServer.exe
CommandLine
© www.soinside.com 2019 - 2024. All rights reserved.