PowerShell Micro Delay

Viewed 1619

I'm using Set-UserPhoto to update the profile images of hundreds of users in Office 365. After completing roughly 100 updates, I encounter a warning saying WARNING: Micro delay applied (Entire warning below). I did some research and although I understand the purpose, meaning, and ramifications of the warning, I do not entirely understand the Balance: field.

After one of these warnings, my Balance was listed as -287463.4/1800000/-3000000. What do these three numbers mean? I've looked but can't find any detailed reference to this particular warning.

WARNING: Micro delay applied. Actual delayed: 14704 msecs, Enforced: True, Capped delay: 14704 msecs, Required: False, Additional info: .; PolicyDN: CN =[BY2PR01MB508]-B2BUpgrade-2014-09-05T18:54:33.9530969Z,CN=Global Settings,CN=Configuration,CN=BASISed.onmicrosoft.com,CN=ConfigurationUnits,DC=NAMPR01 A010,DC=PROD,DC=OUTLOOK,DC=COM; Snapshot: Owner: Sid~S-1-5-21-723078659-1142018202-613220508-4363960~PowerShell~false BudgetType: PowerShell ActiveRunspaces: 0/10 Balance: -297815.8/1800000/-3000000 PowerShellCmdletsLeft: 400/400 ExchangeCmdletsLeft: 200/200 CmdletTimePeriod: 5 DestructiveCmdletsLeft: 120/120 DestructiveCmdletTimePeriod: 60 QueueDepth: 100 MaxRunspacesTimePeriod: 60 RunSpacesRemaining: 20/20 LastTimeFrameUpdate: 10/24/2018 7:04:49 PM LastTimeFrameUpdateDestructiveCmdlets: 10/24/2018 7:04:49 PM LastTimeFrameUpdateMaxRunspaces: 10/24/2018 7:04:49 PM Locked: False LockRemaining: 00:00:00

Footnote: I've learned I can avoid this warning by entering Start-Sleep -Milliseconds 30000, I just want to learn more about the system I'm utilizing.

1 Answers

The warning is because of the throttling system of O365 to save their resources against big loops with quite resource demanding commands.

I am not sure what first and last number in Balance mean but the middle number means recharge rates. It tells you how many ms you can spend per hour on consuming resources. In your case its 1 800 000 ms == 30 mins. The recharge rates depends on your tenant settings and number of mailboxes.

You can read more about O365 throttling policy here

However I don't think that you got the micro delay warning because of exceeding the time reserved for your loop/script but you have most likely exceeded any of the limit mentioned in the link above.

More info can be found also here and here

Related