question

NguyenTee-6512 avatar image
0 Votes"
NguyenTee-6512 asked EchoDu-MSFT commented

SharePoint 2010 Last User Modified Usage Report


We had old SharePoint 2010 site with 1500 site collections. We would like to run PowerShell report to show site name, site url, "last modified" and "last modify by" (Email) in all site collections including all subsites. Is this possible? If yes, please provide PS code that we can use. Thanks Tee

office-sharepoint-server-administration
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @NguyenTee-6512 ,

Would you tell me whether your issue has been resolved or have any update?
I am looking forward to your reply.

Have a nice day!

0 Votes 0 ·

Hi @NguyenTee-6512 ,

Can you tell me whether your issue has been resolved or have any update?

I am looking forward to your reply.

0 Votes 0 ·

1 Answer

EchoDu-MSFT avatar image
0 Votes"
EchoDu-MSFT answered

Hello @NguyenTee-6512 ,

In my test, except that the value of "Last Modified By" cannot be obtained through PowerShell, everything else can be implemented very well.

Please run the below PowerShell script as an administrator.

 Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
 $DataCollection = @()
 $WebAppColl = Get-SPWebApplication
 $SiteColl = Get-SPSite
 Foreach ($Site in $SiteColl)
 {
     Foreach ($Web in $Site.AllWebs)
     {
         $WebAppData = new-object PSObject
         $WebAppData | add-member -membertype NoteProperty -name "Site Name" -Value $Web.Title
         $WebAppData | add-member -membertype NoteProperty -name "URL" -Value $Web.URL
         $WebAppData | add-member -membertype NoteProperty -name "Last Modified Date" -Value $Site.LastContentModifiedDate
         $WebAppData | add-member -membertype NoteProperty -name "Site Owner" -Value $Site.Owner.DisplayName
    
         $DataCollection += $WebAppData
     }
 }
 $DataCollection

76563-powershell.png

Thanks,
Echo Du
==============
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.





powershell.png (18.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.