In a 2008 R2 server, I have a Windows task that executes a PowerShell script that uses Get-EventLog to get Windows event logs from the local server and also from servers over the network. When running the script manually from the PowerShell command prompt, the script works fine. But when running it from the Windows task scheduler, the script only gets the logs from the local server, not from the other servers.
I was able to get it to work by unchecking the "Do not store password. The task will only have access to local resources." checkbox in the task's properties. But we want to avoid that for security reasons. We also don't want to disable the local security policy "Network Access: Do not allow the storage of passwords and credentials for network authentication" in order to get this to work...
Is there another way to get our task to successfully run our script and get the event logs of our servers over the network?