- foreach ($folder in $Shares)
- {
- test-path $folder
- if ($true){
- $NewShares+= $folder;
- }
- }
\\share\folder\\share\folder2\\share\folder5
It's not breaking them into individual objects
What I'm looking at getting is
\\share\folder
\\share\folder2
\\share\folder5