PowerShell script/code to get SharePoint List Item count
The same script works for both lists and libraries. You can add filters to get only specific items.It is recommened to use variables so you can quickly modify the values and reuse script for any other site, list, library.
$siteUrl = "http://siteurl"
$listName = "[Name of List/Library]"
$spWeb = Get-SPWeb $siteUrl
$spList= $spWeb.Lists[$listName]
$items = $spList.Items.Count
- That did'nt work, Issue type User not in directory - SharePoint external access error
- How to get SharePoint Online user details from person or group column using REST API
- Create SharePoint Site Collection with new Content database in existing web application
- Fix Power BI 404 not found error when connecting SharePoint Online List as Data Source
- How to get the SharePoint Tenant Login URL
- How to wrap column text in SharePoint Online Modern List Grid View using JSON formatting
- SharePoint Server 2016 installation System Hardware requirements
- Cannot load PowerApps form in SharePoint Online due to repeated authentication
- Change SharePoint search results FullTextSqlQuery RowLimit 10000
- How to create SharePoint Document Library
- How to exclude results from SharePoint Search
- SharePoint 2010 DataForm Unable to display this Web Part System.StackOverflowException
- Fix Error 2711 SQL RBS client - The installer has encountered an unexpected error. The specified Feature name ('Docs') not found in Feature table
- How to upload file programmatically to SharePoint Document Library using Server Object Model C# .Net
- SharePoint error cannot connect to the configuration database
- Drag drop files here option missing for SharePoint document library
- How to activate and create SharePoint Spaces feature for mixed reality experience - 2D/3D images and web parts
- [Fix] Office 365 Sharepoint One Drive Error: Something went wrong. This is a temporary issue
- SharePoint 2016 error - Could not find file ManageUserProfileServiceApplicationTenantSimplified.xml
- SharePoint List excel import - This table exceeds the maximum number of supported rows
- How to customize SharePoint Modern list form using JSON formatting
- New-SPLogFile PowerShell - create new SharePoint log file
- SharePoint Online REST API not returning all list items and limit to only 100 rows
- How to Get or Set SharePoint Document ID _dlc_DocId using PowerShell
- Get-ADUser PowerShell - Get AD user details using email address
- Whats new in Python 3.10 Pre-release - Python
- Read file from Windows CMD (Command Line) - Windows
- [Fatal Error] XML The markup in the document following the root element must be well-formed. - Java
- How to highlight the current line in Notepad++ - NotepadPlusPlus
- Android is starting optimizing... app 1 of 1 - Android
- Spring Boot JDBCTemplate Upsert Example (batch insert or update if exists) - Java
- How to add Multiple Rulers in Sublime Text - Sublime-Text
- scp: ssh: connect to host xxxx port 22: Connection refused Error - Linux