pnp / script-samples

A sample gallery of scripts to manage all things Microsoft 365.
https://pnp.github.io/script-samples/
MIT License
220 stars 136 forks source link

Add "Query advanced CSOM properties with PnP PowerShell" sample #689

Closed jackpoz closed 7 months ago

jackpoz commented 7 months ago

This sample script shows how to query CSOM properties with PnP PowerShell by writing C# code, importing it in PowerShell and sending a single Invoke-PnPQuery request, useful when trying to speed up scripts that have to process a lot of site collections where every request affects the execution time.

I have used this method went writing inventory scripts with 10'000+ site collections (and I wish I knew about it when I had 300'000 site collections :P )

Closes https://github.com/pnp/script-samples/issues/687

Still unsure about the sample.json and preview.png, hope it's good enough :)

pkbullock commented 7 months ago

Thank you @jackpoz - awesome sample! This should be live shortly 🎉😁