You can change the SharePoint list’s field properties by going to list settings and can change the properties. I am sharing PowerShell Script to change the field properties for SharePoint lists I am using PnP PowerShell script:

#connect to sharepoint online site
Connect-PnPOnline -Url "https://mstalk.sharepoint.com" -Interactive

$fieldName = "Email"
$listName = "ContactDetils"

#get the current web
$spWeb = Get-PnPWeb 

#this will update the SharePoint list property
if($spWeb -ne $null)
{
    #fetch the list field
    $spField = Get-PnPField -List $listName -identity $fieldName
    #This will update the field to 
    $spField.required = $true
    $spField.update()
    $spField.context.executeQuery()
}

Adnan is six time Microsoft MVP (Since 2015) with over 16 years of extensive experience with major expertise on SharePoint, SharePoint based development, Microsoft 365, Microsoft Teams, .Net Platform and Microsoft BI. He is currently working Sr Microsoft Consultant at Olive + Goose. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past 12 years and worked on different intranet/intranet solutions for private & govt. sector majorly in United states and Gulf region and have experience of working with multiple Fortune 500 companies. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply