Script from 2 csv - URL list and Folder list

Occasional Contributor

Hello there!

I have 2 csv files. 

one has 82 rows with unique site address. like below



the other has 1314ish folder names with path. like below


Previously, I used to create 1000s of folder per site per script and now I have to create the same set of folders on 82 sites. so was trying to improvise the script by importing a csv and added 'for each'. the script works but skips all sites and goes to the last site in the list and creates the 1314 folders with correct permission. 


below is what I added to the script trying to trigger the loop.  Please help!

Would you need the full script? let me know, its 107 lines though. :)



$csvs= Import-CSV $csvfilepathsite
foreach ($row in $csvs)
$url = $row.siteurl



1 Reply

This is now solved. Later, posted the same in Poweshell forum and added the whole script, should've dont that here in the first place. 


link to resolution if any one needed it!: