Forum Discussion
Create multiple SharePoint Document libraries with Power Shell or Power Automate
Hello All,
I was wondering if there is/are any ways to create a bulk/multiple SharePoint document libraries or list with Power Shell or Power Apps using .csv file.
Looking forward to hearing from you.
Thank you all.
It should look like as below:
And make sure that you update below link script based on which separator you are using in csv file either semi-colon (;) or colon (,).
Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community
6 Replies
- kalpeshvaghelaIron Contributor
You can use below script from PnP script samples:
https://pnp.github.io/script-samples/spo-add-multiple-lists-using-csv-file/README.html?tabs=pnpps
Above script support to create list and library both.
Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community
- NaligurtanBrass ContributorThanks kalpeshvaghela,
In this case, the columns for this file(ListsAndLibraries.csv) will be:
Title| | Url || PnP Library || DocumentLibrary ||
#Path to CSV file
$csvFilePath = "ListsAndLibraries.csv"
Am i right?
Thanks again.- kalpeshvaghelaIron Contributor
Format of CSV Library is given in same link i.e. https://pnp.github.io/script-samples/spo-add-multiple-lists-using-csv-file/README.html?tabs=csv
Let's say you want to create two document library with following details
Library 1
- Library Url: ProjectDocuments
- Library Title: Project Documents
Library 2
- Library Url: ContractDocs
- Library Title: Contract Documents
Then you csv file should be as below:
Title;Template;Url
Project Documents;DocumentLibrary;ProjectDocuments
Contact Documents;DocumentLibrary;ContractDocsHope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community