This will be the beginning of a series of PowerShell Command Posts 🙂
PowerShell is often used to apply commands to several Objects without having to to the same shit over and over again.
So the first we should learn is to Export to CSV file, leveraging Get-MSolUser, which will give us a list of users we can do stuff with:
Example: Get-MsolUser -DomainName yourdomain.com
Combine it With Export CSV:
Example: Get-MsolUser -DomainName yourdomain.com | Export-CSV C:AteaUsers.csv
The result will be a CSV File include all users at your domain.
But you might not want every attribute stored for the users, so we can add a little to just select certain attributes:
Example: Get-MsolUser -DomainName yourdomain.com | Select UserPrincipalName | Export-CSV C:AteaUsers.csv
So this command will only output the UserPrincipalName, which often is enough to turn it around and do a bulk change on all the users.