Register
: :
Login
Home
News
Forums
Scripts
User Groups
Resources
About
Forums
Search
Members
Unanswered
Active Topics
Forums
>
Using PowerShell
>
SharePoint
sharepoint list items only returns "title"
Last Post 30 Jun 2010 07:10 AM by
steve
. 0 Replies.
Sort:
Oldest First
Most Recent First
Prev
Next
You are not authorized to post a reply.
Author
Messages
steve
New Member
Posts:1
30 Jun 2010 07:10 AM
Hello all,
I am trying to itterate through data values in specific columns in a sharepoint doc library.
using the code below I can return the Title fine, however I canno retrieve data for any other user column. Can someone help me understand this behavior and point me to a solution?
$docliburl=”My correct url"
$relweburl=”/correct directory”
[System.Reflection.Assembly]::LoadWithPartialName(”Microsoft.SharePoint”) > $null
$site=new-object Microsoft.SharePoint.SPSite($docliburl)
$web=$site.openweb($relweburl)
$folder=$web.getfolder($docliburl)
$list=$web.lists[$folder.ContainingDocumentLibrary]
foreach($list.Items in $list)
{
$list.Items | select Title,column1,column2
}
$web.Dispose()
$site.Dispose()
Thanks in advance.
Steven
You are not authorized to post a reply.
Using PowerShell
--General PowerShell
--Books, Tools, and Videos
--Exchange Server
--Active Directory
--System Center Family
--Non-Microsoft Products
--SharePoint
--SQL Server
--Working with .NET
--Peer Review
--Testing, Testing...
PowerShell Development
--Cmdlet Development
--PSDrive Provider Development
--Hosting the Shell
Looking Ahead
--Using PowerShell v2.0
--Developing for PowerShell v2.0
PowerShellCommunity.org
--Community Announcements and Assistance
--Completely Unrelated
--User Groups
--Community Business
----Suggestion Box
Forums
>
Using PowerShell
>
SharePoint
Active Forums 4.3
Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2