Script to list out mostly used subsites and site collections in the farm

sns 9,231 Reputation points
2023-03-02T17:59:56.0633333+00:00

is there any Script to list out mostly used subsites and site collections in the entire farm, If yes please share.

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,297 questions
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 33,641 Reputation points Microsoft Vendor
    2023-03-03T02:11:15.4733333+00:00

    Hi @sns,

    SPWeb.GetUsageData has been desperate since SharePoint 2013:

    User's image

    As a workaround is to directly query SharePoint WSS_logging DataBase to get the data:

    View data in the logging database in SharePoint Server

    And here is a similar issue with yours for reference

    is SPWeb.GetUsageData still available


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.


0 additional answers

Sort by: Most helpful