Exchange/Office365 自動處理腳本:環境準備篇(一)

一、服務器要求
操作系統:Windows Server 2008/2012 R2
網絡要求:

  1. 加入域
  2. 允許訪問office365相關網址
  3. 開通到Exchange/Skype 的端口443,5985,5986
    軟件要求:
  4. 安裝Office2016,Active Directory遠程管理模塊
  5. Microsoft.NET Framework 3.5及以上
  6. 安裝Office365遠程管理助手和模塊

    如何連接到 Office 365 PowerShell

  7. Powershell版本要求5.0及以上,使用$PSVersionTable.PSVersion可檢查版本。

Powershell 5.0安裝包下載鏈接

PS C:\Users\yanhaiyan> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      14409  1005

Powershell設定:

  1. 設置執行腳本策略
PS C:\Users\yanhaiyan> Set-ExecutionPolicy RemoteSigned

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
http://go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y

2.啓用PSRemoting

PS C:\Users\yanhaiyan> Enable-PSRemoting -Force
在此計算機上設置了 WinRM 以接收請求。
WinRM 已經進行了更新,以用於遠程管理。
在 HTTP://* 上創建 WinRM 偵聽程序接受 WS-Man 對此機器上任意 IP 的請求。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章