千家信息网

Exchange/Office365 自动处理脚本:环境准备篇(一)

发表于:2024-09-23 作者:千家信息网编辑
千家信息网最后更新 2024年09月23日,一、服务器要求操作系统:Windows Server 2008/2012 R2网络要求:加入域允许访问office365相关网址开通到Exchange/Skype 的端口443,5985,5986软件
千家信息网最后更新 2024年09月23日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.PSVersionMajor  Minor  Build  Revision-----  -----  -----  --------5      1      14409  1005

Powershell设定:

  1. 设置执行脚本策略
PS C:\Users\yanhaiyan> Set-ExecutionPolicy RemoteSignedExecution Policy ChangeThe execution policy helps protect you from scripts that you do not trust. Changing the execution policy might exposeyou to the security risks described in the about_Execution_Policies help topic athttp://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 的请求。
0