title: Reading event log remotely with Get-EventLog in Powershell
body: <p>I've a powershell script which runs on server(test-server) and reads the log file of his client(DC1).</p>
  
  <ul>
  <li>Both sides can ping to each other.</li>
  <li>On both sides, firewalls are disabled.</li>
  <li><p>Remote Desktop and Remote Assistance are enabled on DC1.</p>
  
  <pre><code>Get-EventLog System -ComputerName test-server -Source Microsoft-Windows-Winlogon # WORKS
  Get-EventLog System -ComputerName DC1 -Source Microsoft-Windows-Winlogon # DOESN'T WORK
  </code></pre></li>
  </ul>
  
  <p>I run this script on test-server. As you see when I read the local log file on test-server it works fine but if I try to read the log file of DC1 remotely I get the error "<em>Get-EventLog : The network path was not found.</em>".</p>
  
  <p><em>Screenshot of the error:</em>
  <img src="https://i.stack.imgur.com/GhQxD.png" alt="enter image description here"></p>
  
  <p>How can I avoid this error and read the log file of DC1 from test-server with using Get-EventLog?</p>