Help with making a powershell script for making a bulk of maps in onedrive

hello everyone,

i am trying to make a powershell script for making a bulk of maps in onedrive
i have a code for making maps in onedrive but I still have to make it so that it works with a scv or an excel file

this is my code please help me

cls
$directoyPath="OneDrive - Personal\Sample Path\Test Folder";
if(!(Test-Path -path $directoyPath))  
{  
    New-Item -ItemType directory -Path $directoyPath
    Write-Host "Folder path has been created successfully at: " $directoyPath
               
}
else
{
Write-Host "The given folder path $directoyPath already exists";
}

Finn,
Welcome to the forum. :wave:t4:

What kind of help do you need? You should ask a specific question.

BTW: When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

How to format code in PowerShell.org <---- Click :point_up_2:t4: :wink:

thnx for the info, what kind of help i need is a way to use a scv or a excel file for creating the maps. so i dont have to name them in the code and just can take the data for the maps out of a scv or excel file

What is a SCV file? :thinking: If you’re talking about CSV files you can use

If you want to read an Excel file you should take a look at the great module from Doug Finke

Here he explains the basics of the module

I don’t know what that means. How do you create a map without PowerShell?

Please always read the help for the cmdlets you’re about to use completely including the examples to learn how to use them.