Forum Discussion
Cole_McDonald
Professor
19 days agoAnything that access the Security event logs from a remote machine will fail... there is a registry permission that needs to be granted for the user:
$domainName = (get-wmiobject win32_computersystem).domain
$userName = "LM_ServiceAccount_Name"
$regPath = "HKLM:\SYSTEM\CurrentControlSet\Services\EventLog\Security"
$rule = New-Object System.Security.AccessControl.RegistryAccessRule ("$DomainName\$UserName","ReadKey","Allow")
$acl = Get-Acl $regPath
$acl.SetAccessRule($rule)
$acl | Set-Acl -Path $regPath
Related Content
- 8 months ago
- 11 months ago