SOLVED

How to query View Definition

Iron Contributor

I have hundreds of sites each having a specific document library with custom views.

I would like to query the sites, identify the ones where the view is not correctly configured and fix.

 

e.g. View is sorted on the wrong field.

 

Any hints on how to achieve this via script?  pnp?

2 Replies
best response confirmed by Gilbert Okello (Iron Contributor)
Solution

@Gilbert Okello I have not done this myself but you might try Get-SPOSite to get all the sites and then run this script to get all these views and their properties.
Regards, Magnus

@MagnusGoksoyrOLDProfile 

 

Great!  Thank you.  That works.

1 best response

Accepted Solutions
best response confirmed by Gilbert Okello (Iron Contributor)
Solution

@Gilbert Okello I have not done this myself but you might try Get-SPOSite to get all the sites and then run this script to get all these views and their properties.
Regards, Magnus

View solution in original post