Add Choice column in SharePoint list or library using PnP PowerShell

If you have not used PnP PowerShell you should use it, it is much easier to do tasks in PnP PowerShell.

Example: If you want to add a Choice column in SharePoint list or library.

Just few lines of code will do this and you don’t need to be on SharePoint server to do this.

But you need to install SharePoint PnP PowerShell

https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps#installation

$encpassword = convertto-securestring -String "<<password>>" -AsPlainText -Force
 $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist "<<domain\username", $encpassword
 Connect-PnPOnline <<site url>> -Credentials $cred
 Add-PnPField -List "<<list name>>" -DisplayName "<<Display name of column" -InternalName "<<internal name of column, make sure no space in name" -Type Choice -Group "<<groupname>>" -AddToDefaultView -Choices <<choice values such as - " 8"," 9"," 10">>

Reference: https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/add-pnpfield?view=sharepoint-ps

Subscribe to my YouTube Channel https://www.youtube.com/channel/UC6vLzWN-3aFG8dgTgEOlx5g

Connect with me on Twitter or Linked In and follow YouTube Channel or my blog https://twitter.com/SinhaKislay

https://www.linkedin.com/in/kislaysinha

/https://synkventures.com

/https://www.youtube.com/channel/UC6vL…

Last week in Microsoft 365 – 07 Oct – 14 Oct 2020 – VLog 1

Topics covered in this Vlog

1.Vesa and Waldek’s 100th Episode of PnP Weekly

2.Scottish summit – call for speakers

3.One Admin Center for SharePoint and OneDrive

4.Cross platform PnP PowerShell preview version released by Erwin

5.App capabilities of Teams 6.Project Nucleus teaser

Transcript of the video:

Hello and Welcome everyone to very first Vlog of ”Last week in Microsoft 365”, since this is the first VLog ever I want to tell you what it is? In this series of videos I will be picking some of things I read or liked in Microsoft 365 area during last week and I will be telling you about in brief and if you like it you can find more about in the link pasted in YouTube video or in my blog post. So let’s gets started

1. First up is of course the champions of the community or I should say leaders of the community @vesajuvonen and @waldekm who finished 100th episode of their PnP weekly which was SP Dev Weekly when it started actually, If you would like to know the story of how it started you should listed or view the video (hint it points to one and only Chris Kent). They also discussed what is the purpose of these videos and it is very encouraging to know that they do this for the community to amplify their reach and also develop a bridge between community members and Microsoft. Do listen to this video highly recommended. Here is a link to it https://www.youtube.com/watch?v=Vs_8b…

2. Number second is that Scottish Summit has been announced and call for speakers expires on 31st Oct so if you have a nice cool topic please submit it, most amazing thing about this summit is that it will have 250 sessions and that too in different languages such as English, Spanish, German, French, Mandarin and my own Hindi. Plus they also have a program for new speaker like me so if you are going to speak for the first time they will help you out. So what is that you are waiting for either send a session or buy the tickets? Register here: https://sessionize.com/ss2021

https://scottishsummit.com/

3. Next up is the a Twitter announcement which I believe is important that there will be one admin center for SharePoint and OneDrive which of course make sense as both of them are so tied up so get ready for that one. Link: https://twitter.com/SharePoint/status…

4. Next up is announcement by father of PnP PowerShell @erwinvanhunen, that is preview version of cross platform PnP PowerShell has been released. In his blog post he explains why it took so long and what are the key changes coming up. So if you are using PnP PowerShell for your work or you rely it on running scripts this is an important information, please reach out to him on Twitter or read the blog. Blog: https://www.erwinmcm.com/cross-platfo…

5. Next one is something which widened my eyes when I looked into this on my Twitter feed, the picture. It shows all he App Capabilities of Teams which is fascinating as you can see it can do almost everything, right from embedded tabs, Bots, Messaging extensions, WebHooks and connectors as well so if you are planning to create an App for Teams do read this and understand what all can be achieved. All thanks to Bill Bliss (@bill_bliss ) for sharing this. Link to docs: https://docs.microsoft.com/en-us/micr… Tweet: https://twitter.com/bill_bliss/status…

6. Ok so the last one, and it is related to one of the big announcements which was mentioned in the Microsoft Ignite this year, that is Project Nucleus , as you are aware we got SharePoint Syntex out of Project Cortex and Nucleus was announced this year. A teaser of this was shown in SharePoint monthly community call – October 2020 at the end so if you would like to see just that part then find the link in YouTube video description or on my blog. So biggest thing you need to know that it allows web apps such as List to be available offline for browsing and editing capabilities. This teaser explains how it works and how they are doing it. It demonstrates a List with 100,000 items and also shows what happens in the backend and also how you can join Project Nucleus.

Video URL: https://youtu.be/-dVZM-UROb0?t=2666