Script from 2 csv - URL list and Folder list

Brass Contributor

Hello there!

I have 2 csv files. 

one has 82 rows with unique site address. like below

rjack_1-1627582314611.png

 

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

rjack_0-1627582174643.png

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
$GroupNames=$row.GroupNames

 

 

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!: https://techcommunity.microsoft.com/t5/windows-powershell/script-from-2-csv-url-list-and-folder-list...