+ Post New Thread
Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 57
Cloud Services Thread, Office 365 questions in Technical; This didn't work for me I got the error: "PS C:\Users\zak\Desktop> Get-msoluser | set-msoluser -usagelocation "GB" WARNING: More results are ...
  1. #16

    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,837
    Thank Post
    219
    Thanked 271 Times in 219 Posts
    Rep Power
    69
    This didn't work for me I got the error:

    "PS C:\Users\zak\Desktop> Get-msoluser | set-msoluser -usagelocation "GB"
    WARNING: More results are available. Please specify one of the All or
    MaxResults parameters."

    help

  2. #17
    themightymrp's Avatar
    Join Date
    Dec 2009
    Location
    Leeds, West Yorkshire
    Posts
    1,276
    Thank Post
    218
    Thanked 236 Times in 204 Posts
    Rep Power
    75
    get-msoluser -resultsize unlimited | set-msoluer -usagelocation "GB"


  3. Thanks to themightymrp from:

    chazzy2501 (20th March 2014)

  4. #18

    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,837
    Thank Post
    219
    Thanked 271 Times in 219 Posts
    Rep Power
    69
    hum "Get-MsolUser : A parameter cannot be found that matches parameter name 'resultsize'."

  5. #19

    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,837
    Thank Post
    219
    Thanked 271 Times in 219 Posts
    Rep Power
    69
    used -maxresults 900 (as I have 815) this is churning now, I'm off to lunch

  6. #20

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,334
    Thank Post
    404
    Thanked 650 Times in 594 Posts
    Rep Power
    188
    What does that GB powershell solve?

  7. #21

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,319
    Thank Post
    902
    Thanked 1,798 Times in 1,549 Posts
    Blog Entries
    12
    Rep Power
    466
    Quote Originally Posted by Edu-IT View Post
    What does that GB powershell solve?
    It sets the location for the user to the United Kingdom. Its a mandatory field. That determines what datacentre to store the data.

  8. #22

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,334
    Thank Post
    404
    Thanked 650 Times in 594 Posts
    Rep Power
    188
    How can I check what is currently set?

  9. #23

    EduTech's Avatar
    Join Date
    Aug 2007
    Location
    Reading
    Posts
    5,075
    Thank Post
    160
    Thanked 937 Times in 731 Posts
    Blog Entries
    3
    Rep Power
    275
    Quote Originally Posted by chazzy2501 View Post
    This didn't work for me I got the error:

    "PS C:\Users\zak\Desktop> Get-msoluser | set-msoluser -usagelocation "GB"
    WARNING: More results are available. Please specify one of the All or
    MaxResults parameters."

    help
    Hi,

    Use the following command

    Get-MsolUser -All | Set-MsolUser -UsageLocation "GB"

    The -All switch will bring back all of the users, at least then you won't have to know how many users you have to the specify a limit

    GB = Location

    If you want to check what is currently set, use the first part of the command before the PIPE (|)
    James,

  10. Thanks to EduTech from:

    themightymrp (20th March 2014)

  11. #24

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,334
    Thank Post
    404
    Thanked 650 Times in 594 Posts
    Rep Power
    188
    Quote Originally Posted by FN-GM View Post
    It sets the location for the user to the United Kingdom. Its a mandatory field. That determines what datacentre to store the data.
    I've just been reading up, and apparently the data centre is decided when you sign up, not because of this command?

  12. #25
    Boredguy's Avatar
    Join Date
    Jun 2011
    Location
    Swindon
    Posts
    676
    Thank Post
    4
    Thanked 148 Times in 137 Posts
    Rep Power
    54
    I thought the GB was just to set the users location so they did not get the prompt on first login and nothing to do with the data centre (since educational accounts get the European ones for us)

  13. #26

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,334
    Thank Post
    404
    Thanked 650 Times in 594 Posts
    Rep Power
    188
    Quote Originally Posted by Boredguy View Post
    I thought the GB was just to set the users location so they did not get the prompt on first login and nothing to do with the data centre (since educational accounts get the European ones for us)
    Think you're spot on. That command didn't allow me to see what was currently set. Did it work for you?

  14. #27
    Boredguy's Avatar
    Join Date
    Jun 2011
    Location
    Swindon
    Posts
    676
    Thank Post
    4
    Thanked 148 Times in 137 Posts
    Rep Power
    54
    It works when we run "Set-MsolUser -UserPrincipalName $user.UserPrincipalName -UsageLocation GB" in our activation script and assigning licenses. Can't say I've see the location selection screen since running it unless I have manually created a user in the 365 web interface and not via DirSync.

  15. #28

    Join Date
    Jan 2008
    Location
    South West
    Posts
    1,837
    Thank Post
    219
    Thanked 271 Times in 219 Posts
    Rep Power
    69
    Code:
    BeaminsterSch:STANDARDWOFFPACK_STUDENT -DisabledPlans MCOSTANDARD, SHAREPOINTWAC_EDU, SHAREPOINTSTANDARD_EDU
    This seems to be a popular option will this give my users office web apps and onedrive? I though OneDrive required sharepoint?

    Code:
    Where-Object {$_.Office -eq "Pupil" }
    I'm assuming this means department? My pupils are in a department of Pupil.

    Code:
    #Set the license options for Office 365, which in this case is just Exchange access
     $LicOptions = New-MsolLicenseOptions -AccountSkuId BeaminsterSch: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 username begins STU
     $users = Get-MsolUser -UnlicensedUsersOnly -Synchronized -MaxResults Unlimited | Where-Object {$_.Office -eq "Pupil" }
     #If we have no users then we can exit out of the script
     if (!($users)) {exit;}
    
     #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 Office 365 license for the user based on the value selected above. This is purely for students
     Set-MsolUserLicense -UserPrincipalName $user.UserPrincipalName -AddLicenses "tenancy:STANDARDWOFFPACK_STUDENT"
    -LicenseOptions $LicOptions
    After I apply the above how to I apply proplus (as the users will now be licenced) Could I filter by security group instead? (I have 2 from ActiveDir "students" and "staff")

    I'm new to power script It seems odd. The above looks for unlicensed users then does something to the student a2 plan, then disables options in that package then assigns the plan.. is that the gist of it?
    Last edited by chazzy2501; 20th March 2014 at 03:18 PM.

  16. #29

    sonofsanta's Avatar
    Join Date
    Dec 2009
    Location
    Lincolnshire, UK
    Posts
    5,261
    Thank Post
    937
    Thanked 1,569 Times in 1,070 Posts
    Blog Entries
    47
    Rep Power
    701
    I don't disable any plans when I assign the licences:
    Code:
    # based on http://community.office365.com/en-us/forums/148/t/17328.aspx
    Connect-MSOLService -Credential $adminCredential
    
    # ask admin which type of account we are adding from migration.csv, checking it's a valid choice
    while ($userType -ne 1 -and $usertype -ne 2)
    {
    	$userType = Read-Host "type 1 for STUDENTS; type 2 for STAFF"
    }
    
    # set $AccountSkuID appropriately
    if ($userType -eq 1)
    {
    	$AccountSkuId = "BeaminsterSch:STANDARDWOFFPACK_STUDENT"
    } elseif ($userType -eq 2) {
    	$AccountSkuId = "BeaminsterSch:STANDARDWOFFPACK_FACULTY"
    }
    
    Write-Host $accountSkuID
    
    # setting other options
    $LicenseOptions = New-MsolLicenseOptions -AccountSkuId $AccountSkuId
    
    # import CSV
    $Users = Import-Csv D:\Office365\migration.csv
    
    # for each user, set location & assign licence
    $Users | ForEach-Object {
    	Set-MsolUser -UserPrincipalName $_.EmailAddress -UsageLocation GB
    	Set-MsolUserLicense -UserPrincipalName $_.EmailAddress -AddLicenses $AccountSkuId -LicenseOptions $LicenseOptions
    	Write-Host "Licence set for user" $_.EmailAddress -f green
    	if ($userType -eq 1)
    	{
    		Set-MsolUserLicense -UserPrincipalName $_.EmailAddress -AddLicenses "BeaminsterSch:OFFICESUBSCRIPTION_STUDENT"
    		Write-Host $_.EmailAddress "granted Office licence" -f yellow
    	}
    }
    That script asks who you're assigning licences to (1 for students, 2 for staff), reads in a list of usernames from a CSV file with a single column headed EmailAddress (D:\Office365\migration.csv - change that to whatever suits your purposes) then assigns the relevant licence. If it's students being licensed, it then also adds the OFFICESUBSCRIPTION_STUDENT to the user - which is what gives them the Pro Plus install.

    That doesn't scan for unlicensed uses on a scheduled task, because that (or a variant of it) is run whenever we set up a new student as part of the procedure. Works for me /shrug

  17. Thanks to sonofsanta from:

    chazzy2501 (20th March 2014)

  18. #30
    Boredguy's Avatar
    Join Date
    Jun 2011
    Location
    Swindon
    Posts
    676
    Thank Post
    4
    Thanked 148 Times in 137 Posts
    Rep Power
    54
    For Proplus, you can add that Set-MsolUserLicense just under the existing one, which is what we do for new students

    For existing users that we rolled ProPlus to, we just adjusted the same search but without the -UnlicensedUsersOnly flag



SHARE:
+ Post New Thread
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Office 365 questions / advice needed
    By tj2419 in forum Cloud Services
    Replies: 1
    Last Post: 1st November 2012, 05:40 PM
  2. Office 365 Question
    By FN-GM in forum Cloud Services
    Replies: 8
    Last Post: 4th June 2012, 05:43 PM
  3. General Office 365 Questions, Help please!
    By AndyCan in forum Cloud Services
    Replies: 0
    Last Post: 22nd May 2012, 06:14 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •