Sunday, April 3, 2016

Get List Fields in SharePoint using PowerShell

Requirement: Get all Fields from a SharePoint list using PowerShell.

PowerShell Script to get all List Fields, Internal Name and Field types:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Configuration Parameters
$SiteURL="http://intranet.crescent.com/"
$ListName= "Quick Links"

#Get the List
$List = (Get-SPWeb $SiteURL).Lists.TryGetList($ListName)

Write-Host "Field Name | Internal Name | Type"
Write-Host "------------------------------------"

#Loop through each field in the list and get the Field Title, Internal Name and Type
ForEach ($Field in $List.Fields)
{
    Write-Host $Field.Title"|"$Field.internalName"|"$Field.Type
}  
This PowerShell script gets all column names, internal name and column types from the given SharePoint list!
sharepoint powershell get list column



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!


You might also like:

Related Posts Plugin for WordPress, Blogger...