If you refer to Martin's post, you can just modify $strComputer with (Get-Content D:\List.txt), which the filter would return a single service.
$service = get-wmiobject Win32_service -computername (Get-Content D:\List.txt) -Filter { Name = 'serviceName' }
Before you port anything outside of Powershell, you should validate the data is what you want. You can get services in Powershell with WMI or the Get-Service cmdlet, which both take string arrays (e.g. string[]) as arguments for the computer. Try running some of these commands:
Get-Service -ComputerName Computer1, Computer2 | Where{$_.Status -eq 'Stopped'} Get-WMIObject -Class Win32_Service -ComputerName Computer1, Computer2 -Filter "State = 'Stopped'"
The results should produce Stopped services on the machines, however, the second method filters out Stopped services BEFORE it returns results where the first method returns all results and THEN filters. This won't make a huge difference for 5 computers, but if you are doing a 100, then you want to only return exactly what you want from the computers. If you want or need to send the Excel spreadsheet somewhere else, then you can use the methodology you are using. However, if you just want to compare services quickly in a GUI form, then you should try something like this:
Get-WMIObject -Class Win32_Service -ComputerName Computer1, Computer2 -Filter "State = 'Stopped'" | Select PSComputerName, Name, State | Out-GridView
Lastly, if you are using Powershell above V2, you should start using Get-CIMInstance (see http://powershell.org/wp/2014/06/04/quick-tip-wmi-vs-cim-syntax/). Have fun.