DotNetVersionLister
DotNetVersionLister copied to clipboard
Add pipeline input for the "ComputerName" parameter
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.
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 =)
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?