Office 365默認的 35MB 的郵件大小限制。Office 365 最大是支持 150MB 的郵件體積的。
我們只需用 Windows Powershell 連接 Office 365 ,然后通過命令修改 Exchange Online 中的郵箱計划即可。
方法如下:
1、連接到 Office 365 PowerShell
借助 Office 365 PowerShell,可以通過命令行管理 Office 365 管理中心設置。連接到 Office 365 PowerShell 是一個非常簡單的三步流程:安裝必需軟件,運行必需軟件,然后連接到 Office 365 組織
步驟 1:安裝所需軟件
這些步驟只需在您的計算機上執行一次即可,而不是在每次連接時都要求執行。但是,您可能需要定期安裝較新版本的軟件。
安裝 64 位版本的 Microsoft Online Services 登錄助手:適用於 IT 專業人員 RTW 的 Microsoft Online Services 登錄助手(https://go.microsoft.com/fwlink/p/?LinkId=286152)。
使用以下步驟安裝 64 位版本的 用於 Windows PowerShell 的 Microsoft Azure Active Directory 模塊:
打開 Azure Active Directory 連接網頁:
http://connect.microsoft.com/site1164/Downloads/DownloadDetails.aspx?DownloadID=59185
在頁面底部的“下載中的文件”中,單擊“下載”以獲取 AdministrationConfig-V1.1.166.0-GA.msi 文件,然后安裝該文件。
步驟 2:打開 Windows Azure Active Directory 模塊
使用以下某個基於 Windows 版本的方法查找並打開 用於 Windows PowerShell 的 Microsoft Azure Active Directory 模塊:
推薦方式
直接通過安裝Windows PowerShell方式,一定要最新版本的,下載地址:https://github.com/Azure/azure-powershell/releases,用右鍵管理員權限打開
如果通過windows powershell方式連接office 365 我們首先需要導入 Office 365 模塊。為此,請在 Windows PowerShell 提示符處運行以下命令:
Import-Module MsOnline
驗證導入是否導入,請運行以下命令:
Get-Module
在此命令返回的模塊列表中,您應該會看到以下內容:
Manifest 1.0 MSOnline {Add-MsolForeignGroupToRole, Add-MsolG...}
步驟 3:連接到 Office 365 訂閱
僅使用帳戶名和密碼連接:
1、在“用於 Windows PowerShell 的 Microsoft Azure Active Directory 模塊”命令窗口中,運行以下命令。
$UserCredential = Get-Credential
輸入office365 中國版的用戶名和密碼
登陸成功后如下圖:
另外請注意如果輸入的是一下命令登陸的窗口是國外地址
命令:Connect-MsolService
2.1、國際版本運行以下命令:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
注意:
- 對於 由世紀互聯運營的 Office 365,使用 ConnectionUri 值:
https://partner.outlook.cn/PowerShell
- 對於 Office 365 Germany,使用 ConnectionUri 值:
https://outlook.office.de/powershell-liveid/
2.2、國內版本運行以下命令:
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell
-Credential $UserCredential -Authentication Basic -AllowRedirection
成功截圖:
參考:https://technet.microsoft.com/zh-cn/library/jj984289%28v=exchg.160%29.aspx?f=255&MSPPError=-2147217396
3 運行以下命令
Import-PSSession $Session
4、運行以下命令查看當前默認的 Office 365 郵箱計划,也就是默認的官方大小命令:
Get-MailboxPlan | Where {$_.IsDefault -eq "True"}
5、運行以下命令查看默認郵箱計划的MaxSendSize和MaxReceiveSize屬性:
Get-MailboxPlan | Where {$_.IsDefault -eq "True"} | Select -Property MaxSendSize, MaxReceiveSize
MaxSendSize控制最大發送郵件大小, MaxReceiveSize控制最大接收郵件大小。從返回的數值我們可以看到,當前MaxSendSize為35MB,而MaxReceiveSize則為36MB
6、修改郵箱附件大小為最大150mb,注意網絡上的文章設置是錯誤的(https://www.sohu.com/a/194448543_99961225)
正確命令為:
get-mailbox |Set-Mailbox -MaxSendSize 150mb
get-mailbox |Set-Mailbox -MaxReceiveSize 150mb
7、查看設置后的郵箱大小命令為:
Get-Mailbox | Select -Property MaxSendSize, MaxReceiveSize
注意此命令是統一把所有賬號統一設置為150mb。
附件下載:通過windows powershell 修改 Office 365默認的 35MB 的郵件大小限制
參考網址:http://www.mamicode.com/info-detail-494553.html
https://technet.microsoft.com/zh-cn/library/dn975125.aspx
http://www.exchangecn.com/office365/20150108_540.html
http://www.cnblogs.com/gill/p/6682774.html