Hi
We could try to use this :
$Results = Foreach ($Server in (get-content "C:\Temp\servers.txt"))
{Get-Service "Windows Event Log" -ComputerName $Server | Select @{Name="Server";Expression={$Server}},Name,Status,DisplayName}
$Results | Select Server,Name,Status,DisplayName | Out-File "c:\temp\EventLog.txt
Here is the similar case which we could refer to
https://community.idera.com/database-tools/powershell/ask_the_experts/f/learn_powershell_from_don_jones-24/14626/add-computer-name-to-output
Best Regards
Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.