PowerShell PipelineVariable parameter contains only first value in a collection of PSCustomObject
问题 Question I get count for lines of code for only one file in the array of type PSCustomObject . Rest all entries in the array error out with following message - Get-Content : Cannot bind argument to parameter 'Path' because it is null. At line:42 char:100 ... -Content -Path $files.UncommentedFileName) | Measure-Object -Line | Select-Objec ... How do I overcome this error and display the lines of code for all the files in the array? Constraints I intend to re-use the function Remove-VBComments