Automating Site Mailboxes in SharePoint 2013 and Exchange 2013

One of the completely new features to ship with SharePoint and Exchange 2013 is the new Site Mailboxes capability to give a unified view of both documents and emails in SharePoint and Outlook. For an overview of the feature, see the Product Group's posting here and for first time configuration information see here.

In this post, I'll be exploring how Site Mailbox provisioning can be automated in an on premises install of Exchange and SharePoint. At present, hybrid scenarios are not supported for Site Mailboxes - i.e. both SharePoint and Exchange should either be on premises or both in the Cloud.

I’ll be running these commands from a SharePoint server and so using remote PowerShell to connect to the Exchange server (called ukmcs15-ex in this example). The following code needs credentials with permission to allow site mailbox creation.

$user = Get-Credential
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://ukmcs15-ex/powershell -Credential $user
Import-PSSession $session
Add-PSSnapin Microsoft.SharePoint.Powershell

First, in my lab environment, I need to do some one off housekeeping to support OAuth over HTTP. Please note, this is not recommended for production environments and only used here to simplify the configuration without using SSL certificates:

$s = Get-SPSecurityTokenServiceConfig
$s.AllowMetadataOverHttp = $true
$s.AllowOAuthOverHttp = $true
$s.Update()

Now, I’ll define the variables for my mailbox. This includes its team site URL, mailbox alias, mailbox display name and one mailbox owner.

$url = http://fifteen/sites/AnotherSiteMailbox
$address = "anothersitemailbox"
$display = "Another Site Mailbox"
$owner = "UKMCS\alexdo"

Let’s do the SharePoint configuration first.

$site = New-SPSite -Url $url -OwnerAlias $owner -Template "STS#0" -Name $display
$web = $site.OpenWeb()
$web.CreateDefaultAssociatedGroups($site.Owner.LoginName,$null,$null)
Enable-SPFeature "CollaborationMailbox" -Url $url

And now the Exchange side to create and link the site mailbox.

$mailbox = New-SiteMailbox -SharePointUrl $url -Name $address -DisplayName $display
$mailbox | Set-Mailbox -Language "en-GB"
$mailbox | Set-MailboxRegionalConfiguration -TimeZone "GMT Standard Time"

You’ll see how I’ve deliberately set a mailbox owner and regional configuration to allow end users to open the Outlook Web Access view without additional prompts.

The finished result in Outlook:

最新文章

  1. openstack七大模块概述
  2. David Camp 微信公众平台开发官方内容拓展版---PHP版本
  3. 基于数据库MySQL的简易学生信息管理系统
  4. tcp/ip详解-ip头部选项字段
  5. 5.1:FactoryBean的使用
  6. 【解决】国内访问github过慢
  7. 深入理解C指针之二:C内存管理
  8. Neutron 网络基本概念
  9. Mac安装HomeBridge适配小米Homekit报错:module未找到解决
  10. thymeleaf 字面量
  11. LCA算法总结
  12. ListView and gridview常用属性
  13. 菜鸟vimer成长记——第2.2章、visual模式
  14. 查看nvidia显卡命令
  15. 遍历语法for...in for...of iterator
  16. iot_programe Makefile hacking
  17. 关于启动MongDB的mongod.exe文件闪退的问题
  18. unity下载资源存储-生成md5
  19. BZOJ 1407 Savage(拓展欧几里得)
  20. 用百度地图API打造方便自己使用的手机地图

热门文章

  1. php总结6——自定义函数、引用传值
  2. 【题解】P2444 病毒
  3. phpPHP创建创建jpg格式图片以及压缩图片(转)
  4. GstAppSrc简介
  5. Qt & MySQL
  6. CentOS下配置静态IP
  7. Vue:实践学习笔记(5)——Vue-Cli脚手架的使用
  8. graphics基础
  9. mini2440移植uboot 2011.03(下)
  10. npm使用淘宝镜像安装包