gpt4 book ai didi

powershell - 拥有 MFA 时使用 Windows Powershell ISE for Exchange

转载 作者:行者123 更新时间:2023-12-03 01:07:50 30 4
gpt4 key购买 nike

我使用 Windows PowerShell ISE 已经有一段时间了,成功连接到 Azure AD、Exchange 和 SharePoint。最近组织发生了变化,所以我们现在使用 MFA 和交换,我跟着这个 https://technet.microsoft.com/en-us/library/mt775114(v=exchg.160).aspx一切都按预期工作。

我的问题是 - 现在有没有办法使用 Windows PowerShell ISE 来运行交换命令?

现在看来我需要打开 Exchange Online 远程 PowerShell 模块并通过该模块连接和运行任何交换命令。我试过使用 Connect-EXOPSSession Windows powerShell ISE 中的 cmdlet,但它不理解 cmdlet

enter image description here
enter image description here

最佳答案

要将 Exchange Online 与 MFA 连接,您需要安装 Microsoft 的 Exchange Online PowerShell 模块 (EXO)。

您可以从 Exchange 管理中心下载 EXO。

安装 EXO 后,在 Windows Powershell ISE 中执行以下注释,

$MFAExchangeModule = ((Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps\2.0\") -Filter CreateExoPSSession.ps1 -Recurse ).FullName | Select-Object -Last 1)
#Importing Exchange MFA Module
. "$MFAExchangeModule"
Connect-EXOPSSession -UserPrincipalName Admin@Contoso.com

关于powershell - 拥有 MFA 时使用 Windows Powershell ISE for Exchange,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44968435/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com