Reading event log remotely with Get-EventLog in Powershell

前端 未结 2 1960
北恋
北恋 2021-01-11 16:46

I\'ve a powershell script which runs on server(test-server) and reads the log file of his client(DC1).

  • Both sides can ping to each other.
  • On both side
2条回答
  •  余生分开走
    2021-01-11 17:16

    @Lars Truijens's suggestion solved my issue. But other suggestions are also important to check.

    So, here is the checklist if you get this kind of error when you try to get log files remotely:

    • Disable or set firewall settings on both sides.
    • Enable Remote Desktop and Remote Assistance on client machine.
    • Can you ping to the client machine?
    • Run dir \\dc1\c$ to see that you are allowed to reach to the harddisk. (@Shay Levy's suggestion)
    • Run Get-Service -ComputerName YOURCOMPUTERNAME to see that you are allowed to reach to the services. (@Shay Levy's suggestion)
    • Start the Remote Registry service. (@Lars Truijens's suggestion and this made it work for me)

    Here is the screenshot of this solution: SolutionScreenshot

提交回复
热议问题