Today I needed to create an array of all the dates in a data range in PowerShell. It’s a simple little thing. Maybe I should have asked Github Copilot , but I’m old skool, so I wrote it myself. (I also haven’t gotten used to having a virtual assistant!)
The reason I even needed to do this is the dread 5000 item view threshold in SharePoint lists and libraries. We have a list with about 1.6 million items in it, and I wanted to “slice out” the ones which matched a specific date range. No matter how I tried to do that in the UI, I failed – not surprisingly, since there are about 1500 items per date.
Links to sympmarc.com (8)
voitanos.ioVoitanos - Be the Best Microsoft 365 Full Stack Developer!