Jump to content

Recommended Posts

Posted (edited)

Couple of questions for 365. I have to assume I have done something wrong in the setup and am hoping the answer is not "just use this 50 page powershell script"...

 

1: I have the directory sync currently running and users are coming over however it is setting all users to the "@schoolname.onmicrosoft.com" domain rather than my real one. I see you can go into each user and change this but must believe there is a better way (not changing 2000 users by hand).Just to add, my real domain is my default.

 

2: How do I assign users a licence in bulk? So far I can only see how to do it one person at a time. The groups have started to sync and would assume I could assign a licence to them but can not see anything obvious.

 

Such early days but so far Google was so much easier to setup.

 

Thanks all

Edited by robjduk
Posted

1) In your active directory, what is the box after the User Logon Name set to. If it is set to @Yourlocaldomain.something, then 365 will assume it should be using the onmicrosoft one.

If you do not have the option to set @Yourschooldomain.blah then you need to add a UPN alias to your domain. You can then update the value in ActiveDirectory and perform a full sync (powershell command) which should fix it on the 365 side.

 

2) Alas that is a powershell step but it's not 50 pages. You can do it via the webpage but it's not that quick. What license did you want your users to have?

Posted

Thanks for the help and yes my users are domainname.internal . Adding a UPN sounds scary :(

 

Just want the users to have basic 365 education for students / faculty so they can get office at home easily. Im ok with powershell but this is proving far harder than I thought it would be.

Posted

1. You can set a default domain in O365 which should firstly assign the correct domain to the users.

 

Also in the users Attribute Editor in AD you set the 'Proxy address' for each of their email addresses/domains

 

'SMTP' (capitals) sets their primary domain)

'smtp' sets the alias domain

 

e.g.

 

'SMTP:[email protected]'

'smtp:[email protected]'

'smtp:[email protected]'

 

When it syncs it should set the correct first domain for each account.

  • Thanks 1
Posted (edited)

The adding of the additional UPN suffix is not that complicated.

Launch AD Domains and Trusts.

Right click on Active Directory Domains and Trust and go to Properties.

The UPN suffixes box appears, add in your e-mail domain (eg schoolname.county.sch.uk)

Click Ok

 

You will then find that you can select that suffix for your users. This should not affect how they use the network in school.

 

[Edit] I assumed you already had the e-mail address field entered for your users in Active Directory [/edit]

 

With regards the licensing, there are a couple of different routes depending on how you wish to provide office to them thanks to the changes MS have done since January with the self signup process.

I'll edit our script and post it up in a few minutes (although our full one is available on Edugeek in an older thread)

Edited by Boredguy
  • Thanks 1
Posted

Ok here is a cut down version of our script just for setting licences for accounts that have been synchronised only. It assumes that you have set a value in the Department field in AD to Student, but you can use anything really.

 

Replace XschoolX with your schoolname that proceeded the onmicrosoft.com

 

Import-Module MSOnline
#Being lazy and putting username and password into the script
$password = "blah"
$username = "YourAdminAccountHere"
$securepass = ConvertTo-SecureString -AsPlainText -String $password -Force

$LiveCred = New-Object System.Management.Automation.PSCredential -argumentlist $username,$securepass

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session
Connect-MsolService -Credential $LiveCred

#Set the Student permissions

#Set the license options for Office 365, which in this case is just Exchange access
$LicOptions = New-MsolLicenseOptions -AccountSkuId XschoolX:STANDARDWOFFPACK_STUDENT -DisabledPlans MCOSTANDARD, SHAREPOINTWAC_EDU, SHAREPOINTSTANDARD_EDU
#Search for users that have no licences as they have just been syncronised and store into array where they have a value in the Office AD field of "Student"
$users = Get-MsolUser -Synchronized -all | Where-Object {$_.Office -eq "Student" }

if (($users)){
   
   #For each user we found, we will loop thought them and apply settings
   Write-Host "Set Licence"
   foreach ($user in $users)
   {
       #Displays on screen the user we are updaing purely for debugging purpose
       Write-Host $user.UserPrincipalName
       #Set the Location to GB for the user which resolves the "error" that is detected
       Set-MsolUser -UserPrincipalName $user.UserPrincipalName -UsageLocation GB
       #Set the Office 365 license for the user based on the value selected above.  This is purely for students
    Set-MsolUserLicense -UserPrincipalName $user.UserPrincipalName -AddLicenses "XschoolX:STANDARDWOFFPACK_STUDENT" -LicenseOptions $LicOptions
       #Set the licence of Office 365 ProPlus provided via EES route and not Self Signup (That is a different SKU)
    Set-MsolUserLicense -UserPrincipalName $user.UserPrincipalName -AddLicenses "XschoolX:OFFICESUBSCRIPTION_STUDENT"
   }
}

Posted

just added the UPN and have found how to force a sync with powershell so will see what happens. Assuming this all falls into place its then a case of making a script to change every user's upn before working on the licencing system.

Thank you for all your help but still dont see why it needs to be this hard. I just kind of blinked at google docs and it worked. :)

Posted (edited)

In AD, select users -> right click properties -> Account Tab -> Tick UPN suffix and select from drop down.

Click Apply and done.

 

No script required :)

 

(IE you can select whole batches of users in 1 go :D)

Edited by Boredguy
Posted

you sir, are awesome.

 

I will no doubt grumble about it all weekend and come in Monday in a mood to powershell my socks off.

 

Thank you

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...