25 votesPhilippe Creytens supported this idea ·
Thanks for posting this! How large does the data set get with you are working with a function like Get-MsolUser with 1000 users? Also, how frequently do you rely one PowerShell Workflow functionality in your scripts vs. using PowerShell and making the script idempotent?
An error occurred while saving the commentPhilippe Creytens commented
Beth, I haven't got a clue and no means, IMO, of figuring this out. Here is the thing: I need to generate some (custom) stats for 4460 Office 365 users. If I run the script in Inlinescript (and need to because most of the Exchange Online cmdlets are incompatible with Powershell Workflow) the script hits the 3 hour barrier and is suspended. I can only assume that it later resumes, but it will resume from the start, creating a vicious circle. Checkpoints could be solution, but only when the output of the InlineScript can be stored. That's the scenario where the "stream failed... 50000 kB is hit.
Microsoft Support tried to assist, suggest this approach because it works for them, and me... but only with small result sets; i.e. Get-MsolUsers -MaxResults 500.
As there no way to "page" Get-MsolUsers (first 500, second 500, etc), I'm stuck.
I cannot imagine that we are the only company wanting to use Azure Automation to manipulate +500 users...