Tutorial by Examples

Loading the SharePoint Snapin can be done using the following: Add-PSSnapin "Microsoft.SharePoint.PowerShell" This only works in the 64bit version of PowerShell. If the window says "Windows PowerShell (x86)" in the title you are using the incorrect version. If the Snap-In is a...
Print out all list names and the item count. $site = Get-SPSite -Identity https://mysharepointsite/sites/test foreach ($web in $site.AllWebs) { foreach ($list in $web.Lists) { # Prints list title and item count Write-Output "$($list.Title), Items: $($list.ItemCoun...
Get-SPFeature -Site https://mysharepointsite/sites/test Get-SPFeature can also be run on web scope (-Web <WebUrl>), farm scope (-Farm) and web application scope (-WebApplication <WebAppUrl>). Get all orphaned features on a site collection Another usage of Get-SPFeature can be to find ...

Page 1 of 1