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

**URL:** <https://forums.powershell.org/t/help-with-making-a-powershell-script-for-making-a-bulk-of-maps-in-onedrive/19786>\
**Category:** PowerShell Help\
**Created:** [July 3, 2022, 8:00pm UTC](https://forums.powershell.org/t/help-with-making-a-powershell-script-for-making-a-bulk-of-maps-in-onedrive/19786 "2022-07-03T20:00:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![FinnAendekerk](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/finnaendekerk/32/2531_2.png) [@FinnAendekerk](https://forums.powershell.org/u/FinnAendekerk)\
**Post date:** [July 3, 2022, 8:00pm UTC](https://forums.powershell.org/t/help-with-making-a-powershell-script-for-making-a-bulk-of-maps-in-onedrive/19786/1 "2022-07-03T20:00:29Z")

</div>

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

```auto
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";
}

```

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [July 3, 2022, 8:25pm UTC](https://forums.powershell.org/t/help-with-making-a-powershell-script-for-making-a-bulk-of-maps-in-onedrive/19786/2 "2022-07-03T20:25:33Z")

</div>

Finn,  
Welcome to the forum. 👋🏽

> [@FinnAendekerk](#):
>
> this is my code please help me

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](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/b/bee50c628238f2c076c0504efb6b15f2fb11f002.gif) \<---- Click 👆🏽 😉

---

<div class="post-metadata">

**Author:** ![FinnAendekerk](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/finnaendekerk/32/2531_2.png) [@FinnAendekerk](https://forums.powershell.org/u/FinnAendekerk)\
**Post date:** [July 3, 2022, 8:41pm UTC](https://forums.powershell.org/t/help-with-making-a-powershell-script-for-making-a-bulk-of-maps-in-onedrive/19786/3 "2022-07-03T20:41:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [July 3, 2022, 8:47pm UTC](https://forums.powershell.org/t/help-with-making-a-powershell-script-for-making-a-bulk-of-maps-in-onedrive/19786/4 "2022-07-03T20:47:45Z")

</div>

> [@FinnAendekerk](#):
>
> to use a scv or a excel file

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

> **[Import-Csv (Microsoft.PowerShell.Utility) - PowerShell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-7.2)**
>
> The Import-Csv cmdlet creates table-like custom objects from the items in CSV files. Each column in the CSV file becomes a property of the custom object and the items in rows become the property values. Import-Csv works on any CSV file, including...

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

> **[ImportExcel 7.8.6](https://www.powershellgallery.com/packages/ImportExcel/7.8.6)**
>
> PowerShell module to import/export Excel spreadsheets, without Excel.
> Check out the How To Videos https://www.youtube.com/watch?v=U3Ne\_yX4tYo&list=PL5uoqS92stXioZw-u-ze\_NtvSo0k0K0kq

Here he explains the basics of the module

[![](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/6/6a8e01b7b7bf1d7ebad8f63c436bb8a64cf467ce.jpeg "ImportExcel PowerShell + Excel = Better Together! with Doug Finke") ](https://www.youtube.com/watch?v=0bR-8b6OMTk)

> [@FinnAendekerk](#):
>
> for creating the maps.

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.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:17pm UTC](https://forums.powershell.org/t/help-with-making-a-powershell-script-for-making-a-bulk-of-maps-in-onedrive/19786/5 "2024-05-16T20:17:45Z")

</div>


