Got a small problem here that I can't seem to find a solution for, if there is any.
I am making a script to clean up in a tree structure, i have to delete either $variable1 og $variable2 number of folders.
But my issue is that I can fine get all the folders into the array, but my for loop stops after it has processed the first folder, how do I return into my for loop again after being out in the function to delete the folders i need?
I don't really want to have the same code in there twice for just one variable difference, so I had the idea of using a function. I can see that the "return" I have in the function just dumps me out back after my for loop.
want to mention that function call in powershell looks like Name1 $Variable Name1($Variable) also work in this example but for several parameters it will be Name1 $Variable $Variable2, not Name1($Variable, $Variable2) !