Solved

How can I get all document metadata and column information from a document library in SharePoint Foundation 2010

Posted on 2014-12-30
4
299 Views
Last Modified: 2015-01-06
I was able to get the list data but it doesn't include the column information about each document.

$web - get-SPWeb "http://sharepoint"
$list - $web.Lists["documentation"]
$item = $list.Items
$item | select  | Export-CSV C:\spinfo12-30.csv

However it only had some of the fields I needed (URL, Name).  In our SharePoint we have several document library specific columns in addition to the out of the box ones that store information about each document.  I need to get Title, Business Area, Category, Store, Region, Doc Type, Created By, Modified By and Checked Out to, Editor, Edit Date, Author.

Where are these stored and how do I access them via powershell?
0
Comment
Question by:CnD_IT
  • 2
4 Comments
 
LVL 12

Expert Comment

by:Ammar Gaffar
ID: 40525060
Check you document library default view, if it is contains the columns you are looking for (Title, Business Area, Category, Store, Region, Doc Type, Created By, Modified By and Checked Out to, Editor, Edit Date, Author), if not then edit the view by selecting all columns you need and try the same power shell commands again.

Good Luck
0
 
LVL 8

Accepted Solution

by:
Jayaraja Jayaraman earned 500 total points
ID: 40533962
With the script below you can easy export all column in a list a comma seperates file

Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null

$url = "<site url>"
$listName = "<list name>"
$path ="c:\Columns.csv"

$web = Get-SPWeb $url
$list = $web.Lists.TryGetList($listName)
$list.ContentTypes | % { $_.FieldLinks } | select Name |  Export-Csv -path $path

To export all internal name of fields in a list you can change the last line into

$list.Fields | select InternalName  |  Export-Csv -path $path
0
 
LVL 8

Expert Comment

by:Jayaraja Jayaraman
ID: 40533964
0
 

Author Closing Comment

by:CnD_IT
ID: 40534021
Thank you!  I was also able to get what I needed from going to the library in SharePoint and exporting to excel.  I then copied/pasted to a separate worksheet so I could modify the location of the columns to suit my needs.  I will keep the above query handy for the future!!  Thanks,
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

708 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

17 Experts available now in Live!

Get 1:1 Help Now