Archive

Posts Tagged ‘exchange’

Change language – Office 365 Mailbox

October 24, 2016 Leave a comment

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:
http://theitbros.com/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

December 23, 2015 Leave a comment

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.

%d bloggers like this: