我试图设置一个非pipe理员能够通过PowerShell远程将事件写入应用程序日志。 远程处理工作,我可以读取registry等。只是不写入事件日志。
invoke-command -ComputerName myhost { write-eventlog -LogName Application -Source CMS -EntryType Information -EventID 200 -Message "Testing CMS event" }
错误是
The registry key for the log "Application" for source "CMS" could not be opened. + CategoryInfo : PermissionDenied: (:) [Write-EventLog], Exception + FullyQualifiedErrorId : The registry key for the log "Application" for source "CMS" could not be opened.,Microsoft.PowerShell.Commands.WriteEventLogCommand
修改所描述的registry权限是不行的,我可以实际上迭代registry作为非pipe理员用户没有问题:
invoke-command -ComputerName myhost { Get-ChildItem "HKLM:\system\currentcontrolset\services\eventlog\application\" }
我曾经看过一些关于这个问题的旧文章。
在这里 , 在这里和这里
我已经试过对这个密钥(显示无权访问)启用审计,并在客户机上使用procmon。 我如何得到这个工作?