How can we retrieve all the choice values in the choice field using powershell CSOM

i hardly could not find any resources for this functionality

any help would be appreciated


You can use the PowerShell command below:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$ListName ="Projects"

$Web = Get-SPWeb $WebURL
$List = $Web.lists.TryGetList($ListName)
#Get the 1st item stored in the list
$Item = $List.items[0]

#Get the multiple choice field 
$MultiChoiceValues = New-Object Microsoft.SharePoint.SPFieldMultiChoiceValue($Item[$MultiChoiceFieldName])

#Print Each Value
For($I=0; $I -lt $MultiChoiceValues.count; $I++)
 write-host $MultiChoiceValues[$I]

Reference: Get-Set Choice Field Value in SharePoint using PowerShell

| improve this answer | |
  • we need powershell Csom script to run it on sharepoint online – Pradeep Jul 4 '19 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.