Finding InternalName with PowerShell

So you have a field in a SharePoint list, and you want its internal name. This can be a real pain. You might be able to read it out of the URL with the Edit Field screen on the Site Columns admin page or the Edit Field screen on the List admin page. But that isn’t always an option. You could always use the object model. But I’ve found the simplest way to be a series of commands in PowerShell:


[system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
$site= New-Object Microsoft.SharePoint.SPSite ("the site url")
$web=$site.OpenWeb()
$list=$web.Lists["the list name"]
$list.Fields |select title, internalname|sort title| more
$web.Dispose()

Advertisements

About George

I'm interested in theology, languages, translation and various sorts of fermentation.
This entry was posted in Code Samples, Systems and Platforms and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s