How can I make a column/field unique in powershell?
Here is the code that I have :
$myList.Fields.AddFieldAsXml("<Field Type='Number' DisplayName='SortOrder' />",$true,[Microsoft.SharePoint.Client.AddFieldOptions]::AddFieldToDefaultView)
$myList.Update()
$ctx.ExecuteQuery()
just need to make it a unique field