SOLVED

Max number of bulk user attributes change per script

Brass Contributor

Hi, I want to ask. If I want to bulk change user attributes with powershell azureAD by importing a Csv file, what is the max number of user attributes that can be changed with a single script from a single csv file?
Is there a limit to the max users in a single csv file that can be processed?

 

Here is what I am planning to do:

1. First script.

Import-CSV "C:\UserAttributes.csv" | Foreach { Set-AzureADUser -ObjectID $_.UserPrincipalName -Department $_.Department -JobTitle $_.Title -Surname $_.LastName -GivenName $_.FirstName -DisplayName $_.DisplayName }

With this script I want to change the users' department, job title, firstname, lastname and displayname.

 

2. Second script

Import-CSV "C:\UserAttributes.csv" | ForEach-Object {
$CPW = $_.Password
$CPWS = ConvertTo-SecureString -String $CPW -AsPlainText -Force
Set-AzureADUserPassword -ObjectId $_.UserPrincipalName -Password $CPWS -EnforceChangePasswordPolicy:$false }

With this script I want to re-assign new password to users.

3. Thrid script

Import-CSV "C:\UserAttributes.csv" | Foreach { Set-AzureADUser -ObjectID $_.UserPrincipalName -UserPrincipalName $_.UPN }

With this script I want to change the users' email.

 

The 3 scripts above are tested and run perfectly with 10 test users that I created.

 

So, back to my question. Is there any limit to the max number of users in one csv file that can be processed with every single script above?

 

Just to let you know, there are 620s users in my department and around 7000 users in the whole organisation. If I can do it at once with a single csv file that will be very convenient.

 

Thank you

2 Replies
best response confirmed by RikkyCitra (Brass Contributor)
Solution
There isnt, but you might run into some throttling issues and such. Best add some delay in between cmdlet execution.
Thank you for the reply. It's very comforting to know that there is no limit to the number of users. I will try to give several hours interval between script execution and do it per sub-department to change smaller number of users at once.

Best regards
1 best response

Accepted Solutions
best response confirmed by RikkyCitra (Brass Contributor)
Solution
There isnt, but you might run into some throttling issues and such. Best add some delay in between cmdlet execution.

View solution in original post