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() 

 

actually can, need use folders instead of lists...  here's script download of attachments list named ttt root of c-drive:

[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

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607