Fetch Monthly Count of SharePoint List Requests

We have done hundreds of automations during last few years and most of these are based on SharePoint lists.

New requirement came into light from management as they want to see the metrics for processed requests from automations.

As these all automations are based on SharePoint lists so we have created below PowerShell magic to capture the data from SharePoint lists.

Prerequisites for this solution:

Download the solution from below git hub link:

https://github.com/VikasSukhija/Downloads

Download the solution from PowerShell Gallery:

https://www.powershellgallery.com/packages/automationmetricsspo

Install-Script -Name automationmetricsspo


Note: Script will auto generate encrypted password first time it is run and save it in the same folder.

This is done so as it does not ask for password every time it runs.

If your environment restricts the service account with credential-based authentication then you need to modify the script to use certificate based authentication. (example shown below)

Connect-PnPOnline -Url $siteURL -Thumbprint $ThumbPrint -ClientId $SPOClientID -Tenant $TenantName

Syntax for running the Script:

.\automationmetricsspo.ps1 -siteURL “SiteURL” -List ‘Pronouns Self Service’ -startdate ‘7/1/2022’ -enddate ‘7/31/2022’ -Tag ‘Automate’

.\automationmetricsspo.ps1 -siteURL “SiteURL” -List ‘MS Teams Voice Form’ -startdate ‘7/1/2022’ -enddate ‘7/31/2022’ -Tag ‘Automate’

.\automationmetricsspo.ps1 -siteURL “SiteURL” -List ‘Microsoft Audio Conference Line’ -startdate ‘7/1/2022’ -enddate ‘7/31/2022’ -Tag ‘Automate’

.\automationmetricsspo.ps1 -siteURL “SiteURL” -List ‘Team Rooms’ -startdate ‘7/1/2022’ -enddate ‘7/31/2022’ -Tag ‘Automate’

It will run like below and will extract the report.csv in the same folder.

Below are the counts between dates -startdate ‘7/1/2022’ -enddate ‘7/31/2022’

Just change the dates and get the counts from many lists at the same time.

Note: Remove the reports.csv file before running when capturing for hundreds of lists as it appends the file data.

 

 

Thanks for reading and downloading…

Tech Wizard

 

https://techwizard.cloud

https://syscloudpro.com/

PowerShell Fast Track

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s