We have a hybrid office365, I wrote a script that creates users in our AD and it assigns our default office365 package. Everything works, but since we don't usually have free licenses, I need to log into office365, buy the new licenses and then run the script.
The question is: is it actually possible to buy licenses from powershell or exists some magic way to do that? I don't mean assign licenses, that's easy, but buy new licenses ready to be assigned.
It's not a huge problem to buy some licenses before running the script, it just doesn't make sense to run a script if I need to use the dashboard anyway.
Thanks!