Home >Tips >Introduction to PnP Generator kalmstrom.com site map icon Site map  

Create SharePoint List with the PnP Generator

A kalmstrom.com Tools tutorial

PowerShell iconWith the free kalmstrom.com service  SharePoint PnP List Generator, you can create new SharePoint lists with new content types in a way that follows recommended practices. The generator currently supports content types based on the List template.

The generator builds a PowerShell script for the list from the values for content type and site columns that the user enters in form. List data can also be added.

When everything is entered, copy the PowerShell code, paste it in Windows PowerShell ISE and run it, and the new list is quickly created.
  1. Enter the name of a content type group. It can be a new or an existing group.
  2. Enter the URL to the SharePoint site where you want the new list to be created.
  3. Enter the name of the new content type you want to create.
  4. Enter the name of the new list.
  5. Enter the names of the site columns and specify the column types.
  6. (Enter data to be added to the list.)
  7. Copy the PowerShell code.
  8. Run Windows PowerShell ISE as an administrator, open a new script and paste the PowerShell code you copied from the PnP Generator.
  9. Make any changes you prefer in the script.
  10. Run the script. Now the list will be created in the SharePoint site you specified in the PnP List Generator.
Peter Kalmström, CEO and Systems Designer of kalmstrom.com Business Solutions, shows the process in the demo below. Peter also explains what the PowerShell script does and where you can see the different steps in the code.


Remove-All

 If you need to start over we recommend running the Remove-All function at the end of the PnP List Generator PowerShell code. That function removes everything and lets you start over from scratch.

Note that the Remove-All function removes everything, as the name implies. The content type, the site columns, the list and the list items are all gone after you have run this code. The code also empties the recycle bin, so there will be no restoring items if you change your mind. This is a power-user tool, use it with caution. 

Import data

As data can be added to the SharePoint PnP List Generator, it is also useful if you want to import data into SharePoint from Excel or another table and when you want to create a better SharePoint list to replace an existing one. In another demo, Peter shows how to import an Excel spreadsheet to a SharePoint list with the PnP Generator.

 



Follow kalmstrom.com on LinkedInFacebook or Twitter!

Products Buy FAQ Services Tips Books Contact About Us Tools

Security and integrity

Copyright  Kalmstrom Enterprises AB  All rights reserved