Enumerating Sites in a farm

posted in: PowerShell 0

Use the following one liner to enumerate the sites and subsites in a SharePoint 2010 or 2013 web application:


If you wanted to pipe that to a file, you could use Out-File, followed by a path to your file, e.g.


if you wanted to run this on a weekly basis, you could do something like this, and add it to a ps1 file. then call it from a scheduled task.