+ Post New Thread
Results 1 to 3 of 3
Windows Thread, Exchange Powershell Script for Setting Default Language in Technical; Hi, Need to set default language for only student users using powershell. I have used the script to set individually ...
  1. #1

    Join Date
    Feb 2007
    Location
    Wolverhampton
    Posts
    330
    Thank Post
    18
    Thanked 35 Times in 33 Posts
    Rep Power
    21

    Exchange Powershell Script for Setting Default Language

    Hi,

    Need to set default language for only student users using powershell. I have used the script to set individually and this works but need to do on mass for about 1300 users.

  2. #2

    Join Date
    Dec 2008
    Location
    Essex
    Posts
    2,144
    Thank Post
    1
    Thanked 326 Times in 316 Posts
    Rep Power
    77
    Hi

    Set default language for what?

    Regards
    S

  3. #3


    Join Date
    Feb 2007
    Location
    51.403651, -0.515458
    Posts
    9,009
    Thank Post
    230
    Thanked 2,694 Times in 1,989 Posts
    Rep Power
    791
    Is this for Outlook Web App, Live@Edu or something else?

    Depending upon what you are trying to do you may be able to modify one of the scripts below.

    Code:
    Get-Mailbox -OrganizationalUnit "OU=students,DC=server1,DC=school,DC=net" -ResultSize unlimited | Set-MailboxRegionalConfiguration -Language en-GB -TimeZone "GMT Standard Time"
    Code:
    'Reading Mailboxes...'
    $boxes = Get-Mailbox -OrganizationalUnit Students -ResultSize unlimited
    
    'Setting Mailboxes...'
    foreach ($box in $boxes)
      {
      $box
      $box | Set-MailboxRegionalConfiguration -Language en-GB -TimeZone "GMT Standard Time"
      }
    $boxes | Get-MailboxRegionalConfiguration | Format-Table
    
    'Done.'
    Code:
    # Source: http://universitytechnology.blogspot.com/2010/11/powershell-update-timezone-region-for.html
     
    # Set Variables
    $ImportFile = "D:\Students.csv"
    $Language = "en-GB"
    $Timezone = "GMT Standard Time"
    $DateFormat = "dd/mm/yyyy"
    $TimeFormat = "h:mm tt"
     
    # Get the e-mail accounts to change
    $EmailAccounts = import-csv $ImportFile
    Write-Host "Accounts Found in CSV File" $EmailsToCheck.Length
     
    if ($EmailsToCheck.Length -gt 0) {
      ## Setup Outlook Session Session and modify accounts
      $LiveCred = Get-Credential
      $loop = 5
      while($loop -gt 0) {
        # this loops handles reconnect if connection to Live fails on first try.
        $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
        if($Session) { 
          $loop = 0
          Import-PSSession $Session
          $EmailAccounts | foreach {
            $Check = Get-MailboxRegionalConfiguration $_.email
            if($Check -ne $Timezone) {
              Write-Host $_.email
              Set-MailboxRegionalConfiguration $_.email -TimeZone $Timezone -Language $Language -DateFormat $DateFormat -TimeFormat $TimeFormat
            }
          }
        } else {
          Write-Host "Session not created... trying again"
          $loop -= 1
        }
      }
    }
    Remove-PSSession $Session.Id

SHARE:
+ Post New Thread

Similar Threads

  1. Exchange Powershell command help
    By bodminman in forum Windows Server 2008 R2
    Replies: 2
    Last Post: 28th September 2010, 06:42 PM
  2. Powershell script to list printers with WPK
    By fawkers in forum Scripts
    Replies: 1
    Last Post: 17th November 2009, 09:55 AM
  3. Replies: 14
    Last Post: 29th October 2009, 06:14 PM
  4. Replies: 13
    Last Post: 20th February 2008, 04:29 PM
  5. Replies: 0
    Last Post: 24th January 2008, 02:58 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
  •