4 comments on “Automating Office 365 Licensing for New Users

  1. I’ve modified the script above and it is assigning licenses for me, but when I run the powershell script it is returning an error message:

    The operation couldn’t be performed because object ‘user@domain’ couldn’t be found on ‘machine.prod.outlook.com’.
    + CategoryInfo : NotSpecified: (:) [Get-Mailbox], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : [Server=X,RequestId=Value,TimeStamp=Time] 87928065,Microsoft.Exchange.Management.RecipientTasks.GetMailbox
    + PSComputerName : name.outlook.com

    I got pretty liberal with some of the description values above, but I’m not well understanding what I can do to resolve this. It licenses the users identified by where-object and dumped into the csv file, and creates a mailbox for them but I want an end user to be able to double click this script after they add a user to AD and sync to Azure. If they see an error message they will call me.


  2. Thanks for the comment.

    I’m not entirely sure I follow how you’re trying to use the script, but my best guess is a permissions issue. The script needs to be run as the same user that created the credentials file. If you’re trying to hard-code credentials into the script so another user can run it, I don’t think that will work.

    Let me know what you find.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s