Call lists.asmx from PowerShell

Script

Name

Description

Last Modified Date

Download

Query List Server

An example to query the SharePoint lists.asmx service from PowerShell

26/02/2013

None

cls
$URI = "http://yourserver.com/_vti_bin/lists.asmx?WSDL"
$listName = "Pages" #You can also use the ID
$cred | Out-Null
if($cred -eq $null)
{
	$cred = Get-Credential
}
$proxy = New-WebServiceProxy -uri $URI -namespace WebServiceProxy -class lists -Credential $cred
$list = $null
$list = $proxy.getlist($listName)
if($list -eq $null)
{
	throw "Cannot get list"
}
write-host "List Title: " $list.Title

CodeMonkey Software is a division of JCHMedia www.jchmedia.com