I have often found that I need to quickly get at the fields defined on a SharePoint list. PowerShell provides an easy mechanism for getting at this and any other data exposed by the SharePoint object model.
Here are the steps to follow to get at the field definitions on a list called "test" in the root web of a site called "http://sharepoint.local".
1) Load the Microsoft.SharePoint assembly into your PowerShell session so that you can utilize the classes defined within.
2) Create an instance of SPSite
$site = new-object Microsoft.SharePoint.SPSite("http://sharepoint.local")
The IT Leader's Guide to Multicloud Readiness
This guide provides practical key insights and important factors to consider to make informed decisions in your multicloud journey.
Note: You need to use the fully qualified class name here.
3) Get the list that you want to work with
$list = $site.RootWeb.Lists["test"]
4) Display the fields using the format-table cmdlet (aliased to "ft") and specify the properties you want to display
$list.Fields | ft title, internalname, type
The result should look something like this.
Using this same approach, you can quickly and easily get at all kinds of useful data that is available via the SharePoint object model.
p.s. Don’t forget to Dispose() the SPSite when you are done with it.