After Coding some lines in a lot of different files you wanna know how much lines you have coded. There are two (I am sure there are even more) ways to do that. The first one is to get the content of the files (Get-Content
) and count the lines in there.
The other way and the fasterway is with Select-String
:
(Get-ChildItem -Include *.ps1 -Recurse | Select-String -pattern .).Count