powershell script :-
$spWeb = Get-SPWeb "http://abcd:12312/sites/Sample/"
$spList = $spWeb.Lists["MysampleCustomList"]
$spListItems = $spList.Items
Write-Host $spListItems.Count
Note:-
http://abcd:12312/sites/Sample/ =Site collection url
MysampleCustomList = ListName
$spWeb = Get-SPWeb "http://abcd:12312/sites/Sample/"
$spList = $spWeb.Lists["MysampleCustomList"]
$spListItems = $spList.Items
Write-Host $spListItems.Count
Note:-
http://abcd:12312/sites/Sample/ =Site collection url
MysampleCustomList = ListName
No comments:
Post a Comment