Estou tentando definir um não administrador com a capacidade de gravar eventos no log do aplicativo por meio do powershell remotamente. Os trabalhos remotos, eu posso ler o registro, etc. Apenas não escrevo no log de eventos.
invoke-command -ComputerName myhost { write-eventlog -LogName Application -Source CMS -EntryType Information -EventID 200 -Message "Testing CMS event" }
O erro é
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
A correção de alterar os direitos de registro descritos não funciona, e posso realmente iterar o registro como o usuário não administrador sem problemas:
invoke-command -ComputerName myhost { Get-ChildItem "HKLM:\system\currentcontrolset\services\eventlog\application\" }
Eu vi vários artigos antigos sobre esse problema.
Eu tentei ativar a auditoria nessa chave (que não mostra acesso) e usar procmon na máquina cliente. Como faço para que isso funcione?
Tags powershell