With over 350 users in the Office365 cloud as in my case it’s difficult being aware of which licenses I really need.
To help my out I’ve made an ActiveDirectory group which holds the allowed Office365 users. And with this PowerShell script I look up every Office365 user and his licenses and check if this users is allowed to use Office365.
If you’re using windows and linux/unix and your also a system administrator who likes to script. The chances are high that you’ll get this error when executing a script on a linux/unix machine that has been made on a windows machine: bin/bash^M: bad interpreter: No such file or directoy
The ^M character is a windows line break, which linux/unix can’t interpret. The solution is easy, use dos2unix [filename] and everything should work fine.
On Office365 the users have to be licensed in order to get access to the Office365 application. I’ve developed a PowerShell script which add a license depending on the group membership in the ActiveDirectory.
The PowerShell ActiveDirectory modules from Microsoft are definitely a pain. That’s why Quest (Dell) has developed a bunch of CMDlets to make the user management through PowerShell a lot easier.
I would like to show you how I create and update my AD users.
As base there’s always a CSV file like this one: TemplateADUsers