How to get field empty values in SharePoint using PowerShell

Advertisement
In this article we can able to see how to get the empty values in a field with count using PowerShell
We are having list with more than 10k items in that we are have a field with Status, now we have to know for this particular filed having empty values.

Add-PSSnapin microsoft.sharepoint.powershell
$web = Get-SPWeb http://dotnetsharepoint.com/sites/sharepoint
$list = $web.lists["ListName"] 
  $i = 0;
write-host $list
$items = $list.items
 #Go through all items
foreach($item in $items)
{
 $mystring = $item["Status"]
IF([string]::IsNullOrEmpty($mystring))
{
write-host  $item.ID
$i = $i+1
}
 }

Write-host "total final items" $i

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM
Advertisements
SHARE

Unknown

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

1 comments:

  1. The purpose of education is to replace an empty mind with an open one. See the link below for more info.


    #empty
    www.ufgop.org

    ReplyDelete