Link to home
Create AccountLog in
Avatar of John Davies
John DaviesFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Office365 Bulk Enable not CSV

Does anyone have a powershell script to bulk enable YAMMER for all users (not through csv) for office 365?

Thanks in Advance

John
Avatar of Todd Nelson
Todd Nelson
Flag of United States of America image

You probably could but why?  Yammer is a license option within the Enterprise subscription so it will be a bit of a challenge to do it without a CSV file and without knowing what options you have in your subscription.

What type of subscription(s) do you have?  It may or may not include Yammer.

Do you have enough licenses for all of the Office 365 users?  If not, then that would be a reason to assign them via CSV file.

If you must, it's easy enough to assign every user a license in Office 365.  Use the following two commands.  I'm assuming you have an Office 365 Enterprise subscription and everyone is in the United States.

Get-MsolUser | Set-MsolUser -UsageLocation "US"
Get-MsolUser | Set-MsolUserLicense -AddLicenses "YourTenantName:ENTERPRISEPACK"

Open in new window


If you need to do anything beyond that, it will be best to address it with a script.  Please review this article.

Avatar of John Davies

ASKER

Hi Todd,

Thanks for your response, quite happy to use the CSV if needed, just need to add Yammer to a subscription for over 700 users.

We have an E3 ENTERPRISE subscription and are looking to enable YAMMER on users that already have an ENTERPRISEPACK license.

Thanks

John
CSV consists of MyUPN as an email and MyUsageLocation

Script

$MyLicenseOptions = New-MsolLicenseOptions -AccountSkuId "a14idt:ENTERPRISEPACK" -DisabledPlans PROJECTWORKMANAGEMENT,INTUNE_O365

Import-Csv "C:\power\users.csv" | ForEach-Object { Set-MsolUserLicense -UserPrincipalName $_.MyUPN -LicenseOptions $MyLicenseOptions }

I have tried the script on the link shared and get


Set-MsolUserLicense : Cannot bind argument to parameter 'UserPrincipalName' because it is null.
At line:3 char:91
+ ... Each-Object { Set-MsolUserLicense -UserPrincipalName $_.MyUPN -Licens ...
+                                                          ~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Set-MsolUserLicense], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.Online.Administration.Automation.SetUserLicense
I assume...

  • You assigned a UsageLocation prior to attempt to assign a license option?
  • You assigned a license before modifying the license options?
  • There are no typos in your CSV file?

Could you provide a screenshot of the CSV?

I just tested with a few accounts and it worked without issue for me.
Thanks Todd I have attached a snip of the fields in use, appreciate your time and patience.

You assigned a UsageLocation prior to attempt to assign a license option? All assignment location are there
You assigned a license before modifying the license options? All users have a license
There are no typos in your CSV file?

As i pointed out we have 700 E3 licensed users and roughly 50 Unlicensed (new starters, not started yet) I am trying to enable the YAMMER from the E3 ENTERPRISEPACK to only the people that have an E3 LIcense.

Thanks

John
2017-03-14_20-39-28.jpg
By default, Yammer should already enabled when a user is assigned an E3 license.

User generated image
Is that not the case for you?  Trying to understand why you might need to enable Yammer when it already should be.
Yammer has been disabled as people have joined the project, it was was of things we have done as part of the joining routine. Now, 700 users later they want to use it. :-)
ASKER CERTIFIED SOLUTION
Avatar of Todd Nelson
Todd Nelson
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Got this resolved using gingerex in the end Todd but appreciate all you help. I thought it should have worked but for some reason it didn't, will keep trying it,

Thanks again and sorry for the delay, got working on other site elsewhere.