Davit2005 Posted May 6, 2014 Posted May 6, 2014 Whenever I try to do this it causes problems with the user opening their Outlook, it says there is a problem with the users mailbox. We seem to notice when I try and set the TimeZone for UK and I'm wondering if it is down to the code I am using it does set the language fine but not the Time Zone. set-MailboxRegionalConfiguration -TimeZone "GMT Standard Time" -Language en-GB We have a script that runs first which uploads students to Office 365 (until we setup DirSync). A while after the students have been uploaded a second script comes along, Sets the mailbox configuration for each unlicensed student and then applies licences. We will set up DirSync soon but will need to have a script to follow that assigns licenses anyway so this is why I have broken down onto to tasks.
andyrite Posted May 6, 2014 Posted May 6, 2014 Looks like the right command. I used Get-Mailbox -Filter {RecipientTypeDetails -eq 'UserMailbox'} | set-MailboxRegionalConfiguration -Timezone "GMT Standard Time" -Language en-GB 1
Davit2005 Posted May 6, 2014 Author Posted May 6, 2014 It doesn't seem to recognize the cmdlet 'set-MailboxRegionalConfiguration' even when I type manually.
andyrite Posted May 6, 2014 Posted May 6, 2014 You need to import the commands $Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection Import-PSSession $Session Set-ExecutionPolicy RemoteSigned 1
Zoom7000 Posted May 6, 2014 Posted May 6, 2014 Interesting. When I called Microsoft support and asked if this can be predefined, they said no!
andyrite Posted May 6, 2014 Posted May 6, 2014 Interesting. When I called Microsoft support and asked if this can be predefined, they said no! Sounds about right for Microsoft Support.
Davit2005 Posted May 6, 2014 Author Posted May 6, 2014 You need to import the commands $Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection Import-PSSession $Session Set-ExecutionPolicy RemoteSigned That's exactly what I am doing but the PowerShell says no Is there a way I can test that I am actually connected to the Office 365 with PowerShell????
andyrite Posted May 6, 2014 Posted May 6, 2014 That's exactly what I am doing but the PowerShell says no Is there a way I can test that I am actually connected to the Office 365 with PowerShell???? You need the Azure modules by the sound of it. Manage Azure AD using Windows PowerShell
Davit2005 Posted May 7, 2014 Author Posted May 7, 2014 You need the Azure modules by the sound of it. Manage Azure AD using Windows PowerShell Well I fixed the issue with the command. The user account (a basic user administration account) that I was using in the script didn't have the command available but when I log in with my own account the command is available
Davit2005 Posted May 8, 2014 Author Posted May 8, 2014 I have found now that you need to add a switch for it to populate and go straight into Outlook -Timezone "GMT Standard Time" -confirm:$False
andyrite Posted May 8, 2014 Posted May 8, 2014 I have found now that you need to add a switch for it to populate and go straight into Outlook -Timezone "GMT Standard Time" -confirm:$False Thats a new one on me. Thanks for that.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now