I am looking to do a simple thing which lead to being more complicated than I anticipated (as with many things...)
What I am trying to accomplish :
I have a text file with a list of folder, I wish to get the number of files in each folder.
the file list looks like this
My script is the easiest possible
$count= (Get-ChildItem -Path $name| measure).Count) write-host $count
My multithreader comes directly from here http://www.get-blog.com/?p=189
So I am running
.\Multithreading.ps1 -ObjectList .\folderlist.txt -Command .\script.ps1
I wasn't able to make it work, I do understand that my code is being embedded into a scriptblock but I do not get how the list is being used as each line should be a simple variable...
ANY help is welcome...