I am trying to create a scheduled task to execute a powershell script in Windows Server 2012 R2. By executing the powershell script, I want to get the log in events and store it in a file. When I trigger the task, the powershell script is executing and creating the file which will store the information but it is not able to fetch the login information from event logs.
When I try to run the task as Administrator, everything works fine.
So, do I need to set any extra permission to fetch log-in information in powershell script, if I create the scheduled task to be executed from Windows Local Service account?
Thanks in Advance.