I am trying to create a script for adding user licenses to O365. when I run the following line:
$license = New-Object -TypeName Microsoft.Open.AzureAD.Model.AssignedLicenses
I get the following error:
Cannot find type [Microsoft.Open.AzureAD.Model.AssignedLicenses]: verify that the assembly containing this type is loaded.
I couldn't find anything to address this error and hoping for some help.