Need to see all the fields in a Sharepoint list with properties

Posted on 2012-09-11
Last Modified: 2012-09-13
I need to export to Excel all the fields that exists in a SharePoint 2010 list. It should include the name of the field, type, description and if it is required or not. Can something like this be done using PowerShell?
Question by:MisUszatek
    LVL 6

    Accepted Solution

    Give this a go. I've only tested this on SharePoint 2007, so I've haven't tried it using 'Get-SPWeb'. It should work fine though. If you have any problems, let me know and I'll give a try on a 2010 box later.

    $web = Get-SPWeb "http://url-of-site"
    $list = $web.Lists["Name of List"]
    $list.Fields | Select Title,Description,Type,Required

    Open in new window

    LVL 6

    Expert Comment

    Sorry forgot the export to excel bit

    change the last line to

    $list.Fields | Select Title,Description,Type,Required | Export-CSV C:\Temp\Fields.csv -NoTypeInformation

    Open in new window


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
    Why would I want to create a function for tracking messages? I am glad you asked. As with most monotonous/routine tasks, human error tends to creep in after doing the same task over and over again. By creating a function, you load the function once…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now