I
improved that script a while back. Likely needs updated testing, I haven't touched it in years and things have likely changed.
Alternatively, you could:
• Define the number of users you will want per storage account
• Create an Active Directory Group per Storage Account
• Add the appropriate users to this group -> how you do this is up to you, use appropriate business rules
• Use
FSLogix and Per User/Group Object Specific Configurations to point members of that group at the appropriate storage account
• Figure out control mechanisms to remove users and their data once gone, ensure groups don't go over the max (user a buffer mechanism would be wise) etc.