office 365 powershell
2 TopicsAdd email alias to multiple O365 user accounts in bulk
Hello team, We currently have a domain: abc.com We are going to add a new domain: xyz.com users are in-cloud. We want to add email aliases to some of our users as user@xyz.com and set it as primary. however I didnt find any script which will do this in bulk for multiple users. I found a script which does for all users however we just have to apply the script for 60-70 users. Any help would be appreciated35KViews0likes5CommentsGroup based Licenses for Multiple users in Multiple groups
I have a scenario where i need to take input from the CSV file for multiple users who have their UserprincipalName, Security Group and Action (Add or Remove).I need to write a power shell script to add the users automatically after taking the inputs from the CSV file. UserPrincipalName, Secuirty Group, Action test1,G1,Add Test2,G2,Add .... .... Tes20,G12,Remove I used this for single user Connect-MsolService $groups = Get-MsolGroup -all -grouptype security | where {$_.DisplayName -eq "G1"} $users = Get-MsolUser -all | where {$_.UserPrincipalName -like "Test*"} $users | Foreach {Add-MsolGroupMember -GroupObjectId $group.objectid -GroupMemberType “user” -GroupMemberObjectId $_.objectid} How would you do it for the above scenario for multiple users?897Views0likes1Comment