DotNetVersionLister icon indicating copy to clipboard operation
DotNetVersionLister copied to clipboard

Add pipeline input for the "ComputerName" parameter

Open drlsdee opened this issue 3 years ago • 2 comments

To enable support for expressions like this:

Get-ADComputer -Filter "(OperatingSystem -like '*Windows*') -and (Enabled -eq '$true')" | Select-Object -ExpandProperty DNSHostName | Get-STDotNetVersion @otherParams

This means that not only should the "ValueFromPipeline" flag be enabled, but the data should also be appended to the output CSV file, rather than overwritten.

drlsdee avatar Nov 25 '22 09:11 drlsdee

OK, I have looked at the code and I see that the "DotNetData" variable is populated with values in the "process" block and converted to CSV output in the "end" block; therefore, it's literally enough to add the "ValueFromPipeline" property in the parameter attribute =)

drlsdee avatar Nov 25 '22 13:11 drlsdee

It looks like I complicated pipeline input a bit with how I handle the parameters. I rely on a collection/array with a .Count property. Hm. Will see. Not so important, right?

EliteLoser avatar Dec 13 '22 11:12 EliteLoser