Some of the commands you have there have been deprecated. When assigning bulk user, I use the following in conjunction with a csv file:
$teams = Import-Csv "C:\Users\Temp\FILENAME.csv"
foreach ($team in $teams) {
Set-CsPhoneNumberAssignment -identity $team.identityname -PhoneNumber $team.phonenumber -PhoneNumberType DirectRouting
Grant-CsTenantDialPlan -PolicyName "YOURPOLICYNAME" -Identity $team.identityname
Grant-CsTeamsCallingPolicy -PolicyName AllowCalling -Identity $team.identityname
Grant-CsOnlineVoiceRoutingPolicy -PolicyName "YOURPOLICYNAME"-Identity $team.identityname
}
If you have the policies assigned allready you only need to run the Set command.
The Csv format is as follows: identityname,phonenumber
Hope this helps.
Regards,
Tiaan