Tagexchange

Reset folder language to match Outlook Web Access language

So in the recent time i have been working with a customer to integrate Exchange Online mailboxes into a customer support application witch are using POP. The application throwed a error message:

02:47:34.513 Trc 21628 [MsgIn-2] <pop-client1> Mailbox account 'yourmailbox@domain.no'[https://outlook.office365.com/EWS/Exchange.asmx:443]: opening mail folder 'INBOX'
02:47:34.748 Std 21627 [MsgIn-2] <pop-client1> No INBOX Folder found on Corporate Email Server

This indicates that the software witch is polling emails need the inbox folder to be “Inbox” and not “innboks” (witch is Inbox in norwegian). So we need to change the default folders to match the language set in OWA.

  1. Logon to your account on outlook.office.com
  2. Head into to the Gear icon next to your profile picture in the top-right corner and in the bottom select: Your app settings-> Mail

3. Select General in the left pane and then click on: Region and timezone.

4. In language, set your language for OWA and check the checkbox witch also renames the default folders to match the selected language and hit the save button.

Change language – Office 365 Mailbox

To change the Language for a Office 365 mailbox (Exchange Online), run the following commands:

$O365Session = New-PSSession –ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection

Import-PSSession $O365Session

Set-MailboxRegionalConfiguration -Identity “USER” -Language nb-no -LocalizeDefaultFolderName

For full list of cultureinfo classes (Languages) see:
https://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo(VS.71).aspx

Office 365 Add calendar permissions with powershell

To add permissions on a Exchange Object in Office 365 using PowerShell the cmdlet set-MailboxFolderPermission or add-MailboxFolderPermission can be used.

In this example we add editor permissions for user2 to user1’s calendar. This will enable user2 to edit, add or delete content of user1’s calendar.

set-MailboxFolderPermission -Identity user1@domain.no:\calendar -user user2@domain.no -AccessRights Editor

Note: kalender is the Norwegian Word for Calendar

To bulk add all users in a Tennant as Reviewer to user1@domain.no’s calendar run the following cmdlet.

$Users = Get-Mailbox | Select-Object -ExpandProperty userprincipalname
ForEach ($user in $Users )
{
Add-MailboxFolderPermission -Identity “user1@domain.no:\calendar” -User $User -AccessRights Reviewer
}

For full details of this cmdlet:
https://technet.microsoft.com/en-us/library/dd298062(v=exchg.160).aspx

And for my original Source:

Add Calendar Permissions in Office 365 via PowerShell

How to store emails sent from a shared mailbox in the correct sent folder

Problem: User sends email as a shared mailbox (shared@domain.com) but the sent email gets stored in the users sent items in Outlook (user@domain.com).

To have Outlook Place the sent item in the correct sent item folder, do the following registry change.

NOTE: Changing registry might cause unwanted Things to happen to Your computer. Always back up before changing the registry.

The fix:

1.Click Start, click Run, type regedit, and then click OK.
2.Locate and then click the following registry subkey:
HKEY_CURRENT_USER\Software\Microsoft\Office\x.0\Outlook\Preferences
Note The x.0 placeholder represents your version of Office (16.0 = Office 2016, 15.0 = Office 2013, 14.0 = Office 2010).
3.On the Edit menu, point to New, and then click DWORD Value.
4.Type DelegateSentItemsStyle, and then press Enter.
5.Right-click DelegateSentItemsStyle, and then click Modify.
6.In the Value data box, type 1, and then click OK.
7.Exit Registry Editor.

This fix Works for Outlook 2013 and newer. It does the fix on the Client, without having to change the Exchange server. For larger enterprices where it is more conveenient to have this as a server setting please read this blog article:
http://blogs.technet.com/b/exchange/archive/2015/03/03/want-more-control-over-sent-items-when-using-shared-mailboxes.aspx

Source:
https://support.microsoft.com/en-us/kb/2843677

SMTP Relay in Office365

When sending email from i.e. Visma or other 3. party applications you need a SMTP server. Some times you can use the local ISP SMTP server, but then you need to add that SMTP server to yours domain SPF record. You might don`t wnat to do this.

 

Here is the solution:

Log in to the tennant, and start Exchange management console.

Create a connector filtering on the public IP address beeing used for the server that hosts Visma.

In Visma add a SMTP server using your MX record for that tennant (i.e. itstyring-no.mail.protection.outlook.com​ ) and port 25.

 

This connector will relay email with from addresses containing a valid domain for that tennant.

Allow external senders in Public folder – Office365

Public folders are set to NOT allow external senders to public folders in Office 365. This can be fixed using the following receipt:

Conncect to the Windows Azure Active Directory Module for Windows PowerShell using the following commands.
Create a placeholder for your credentials:
$LiveCred = Get-Credential

Popup box will ask for your Office 365 Global Administrator credentials.

Create a placeholder for your Powershell Session towards Exchange Online.
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

Import your Powershell Session to connect to Exchange Online.
Import-PSSession $Session

Run this command to allow all scripts:
set-executionpolicy unrestricted

Then the public folder part
Add-PublicFolderClientPermission \(Path of the Public folder name) -User Anonymous -AccessRights CreateItems

Powershell: Exchange – Check database size

Here is a one liner to check the database size for exchange databases.

Start Exchange management shell. Then run the following command:

Get-MailboxDatabase | foreach-object {add-member -inputobject $_ -membertype noteproperty -name mailboxdbsizeinGB -value ([math]::Round(([int64](get-wmiobject cim_datafile -computername $_.server -filter (‘name=”’ + $_.edbfilepath.pathname.replace(“\”,”\\”) + ””)).filesize / 1GB),2)) -passthru} | Sort-Object mailboxdbsizeinGB -Descending | format-table identity,mailboxdbsizeinGB

Source:
http://blogs.technet.com/b/gary/archive/2009/08/11/get-exchange-mailbox-database-size-one-liner-version-2.aspx

Exchange tips: Out of Office on users

To check information about Out Of Office for mailbox users we can run an powershell “one liner” and get useful information.

The PS, Get-MailboxAutoReplyConfiguration “username” will show you this useful information:

  • AutoReplyState (Disabled/Enabled)
  • Start date (date and time)
  • End date (date and time)
  • External Message (in HTML format)
  • Internal Message (in HTML format)

OOO_ps

With this command you can easily change the message as wel!

Get-MailboxAutoReplyConfiguration julras | Set-MailboxAutoReplyConfiguration -ExternalMessage “Hi, I`m testing OOO” -InternalMessage “Hi, I`m testing OOO” -Autoreplystate Enabled

As you can see in my PS command i here GET the results of “julras” user and pipe it throug an SET command to change the External and internal message and then Enable the Out of Office for the user.

Change primary email address in Office 365

Start powershell as administrator

Run the following commands:
$LiveCred = Get-Credential
(Enter your Office 365 administrator credentials)
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session

Find all aliases for one account:
get-mailbox | select -expand emailaddresses alias
Alternativt:
get-mailbox name@domain.com | select -expand emailaddresses alias

Add email alias to an Account:
Set-Mailbox name@domain.com -EmailAddresses SMTP:newprimaryaddress@domain.com,anotheraddress@domain.com,yet.another.address@domain.com

NOTE: the first address after “SMTP:” will be the primary e-mail address. All aliases will be replaced. If you have 100 aliases and only type in one in this command, you will lose 99 aliases!

Set passwords to never expire in office 365

First, Enable .net 3.5 on your system.

Then, Download and Install Microsoft Online Services Sign-In Assistant

Microsoft Online Services Sign-In Assistant 64-bit (BETA) – <a title=”Microsoft Online Services Sign-In Assistant 64-bit (BETA) – http://www.microsoft.com/en-my/download/details.aspx?id=39267

Then Download and install Microsoft Online Services Module for Windows PowerShell

Microsoft Online Services Module for Windows PowerShell 64-bit – http://g.microsoftonline.com/0BX10EN/423

Restart computer and start “Microsoft Online Services Module for Windows PowerShell”

Type the command:  Connect-MsolService

And in the dialog enter the credentials of your Office 365 administrator

To control if a password for a single user expires
Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires

To change the password policy to never expire for a single user
Set-MsolUser -UserPrincipalName <user ID> -PasswordNeverExpires $true

To change the password policy to never expire for all users at once
Type the command: Get-MsolUser | Set-MsolUser -PasswordNeverExpires $True

To control that the modifications have been applied
Type the command “Get-MsolUser | fl”

And if you need to apply password policy to users

To change the password policy to expire for a single user
Set-MsolUser -UserPrincipalName <user ID> -PasswordNeverExpires $false

To change the password policy to expire for all users at once
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $false

© 2019 IdefixWiki

Theme by Anders NorénUp ↑