Powershell script to get site title, site owner, site user count and usage
Add-pssnapin Microsoft. sharepoint. powershell-erroraction silentlycontinue $ wburl = read-host "Enter web application URL" $ webapp = Get-spwebapplication $ wburl $ outputpath = read-host "Enter path to save results" Add-content -Path $ outputpath-value "site title, site URL, site owner, usercount, usage in MB "foreach ($ sitecollection in $ webapp. sites) {$ url = $ sitecollection. URL $ webs = Get-spweb $ URL [Boolean] $ writetofile = $ true $ weburl = $ sitecollection. openweb () $ siteowner = "" foreach ($ siteadmin in $ weburl. siteadministrators) {$ siteowner = $ siteadmin. loginname + "|" + $ siteowner} foreach ($ web in $ webs) {# Grab all users in the site collections $ siteusercnt =$ Web. allusers. count $ siteurl = $ Web. URL $ sitetitle = $ Web. title $ site = Get-spsite $ siteurl $ siteusage = $ site. usage. storage/1mbadd-content-path $ outputpath-value "$ sitetitle, $ siteurl, $ siteowner, $ siteusercnt, $ siteusage" $ web. dispose () }}