how to list out List items in sharepoint.I'm getting only one column/field returned which is the title field
when run th code below. title colum returned doesn't show other fields...
any ideas need do.quite new powershelll :(
thanks in advance
[system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
$site = new-object microsoft.sharepoint.spsite("http://mysite")
$web = $site.rootweb
$lists = $web.lists["servers"]
foreach($list.items in $lists)
{
$list.items | select title,ipaddress,cpuspeed,created
}
$web.dispose()
$site.dispose()
[system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint") $site = new-object microsoft.sharepoint.spsite("http://sp2k7dev") $web = $site.openweb("") $list = $web.lists["ttt"] $folders = $web.folders["lists"].subfolders["ttt"].subfolders["attachments"].subfolders $folders|foreach { $_.files |foreach { if ($_.name -ne $null) { $bin = $_.openbinary() $fs = [system.io.file]::create("c:\$($_.name)") $fs.write($bin,0,$bin.length) } } }
Windows Server > Windows PowerShell
Comments
Post a Comment