Hi
I understand completely the difference between byVal and bypropertyname pipelining so when I saw the following it really threw me, because I cannot explain it.
Can someone please offer an explanation, I have a theory, but I need some better proof than a hunch??
In a CSV file I have the following
Computername
Computer1
Computer2
if I run the following pipeline it does not work as I would have expected it to!!
import File.csv | get-service
This returns an error to the effect that it cannot find services called Computer1 and Computer2. But this should have used ByPropName Pipeline passing and that means that the computername property from the imported csv should have matched the -computername parameter of the Get-Service and hence I would have expected it to list all services on both computers.
The workaround was to override the -name parameter like this
import-csv file.csv | get-service -name *
But this does not explain why the computername property was matching the -name parameter in the Get-Service command...
Does anyone know why this happens??