How To Get The Index Columns In SharePoint 2013 Using Powershell Commands

Steps

Start your Windows PowerShell on your computer.

Right click and select Run as administrator option.

Paste the below script on the PowerShell window and click the enter button.

Check your SharePoint site Feature will activate successfully.
  1. $web = Get-SPWeb -Identity http://gowtham.sharepoint.com/teams  
  2. $list = $web.Lists["Tutorials"]  
  3. foreach ($field in $list.Fields)  
  4. {  
  5.     if ($field.Indexable)  
  6.     {  
  7.         if ($field.Indexed)  
  8.         {   Write-Host "....Indexed Columns are Listed Below"  
  9.             Write-Host $field.Title       
  10.         }  
  11.     }     
  12. }  
Thanks for learning.. 
Ebook Download
View all
Learn
View all