当您拥有 MFA 时,使用 Windows Powershell ISE for Exchange
Use Windows Powershell ISE for Exchange when you have MFA
我已经使用 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 模块并通过该模块连接 运行 任何交换命令。我尝试在 windows powerShell ISE 中使用 Connect-EXOPSSession
cmdlet,但它不理解 cmdlet
我在导入 Exchange Online 模块时遇到以下情况,允许您使用 New-ExoPSSession 进行连接
Import-Module $((Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps.0\") -Filter Microsoft.Exchange.Management.ExoPowershellModule.dll -Recurse ).FullName|?{$_ -notmatch "_none_"}|select -First 1)
要将 Exchange online 与 MFA 连接,您需要安装 Microsoft 的 Exchange Online PowerShell 模块 (EXO)。
您可以从 Exchange 管理中心下载 EXO。
安装 EXO 后,在 Windows Powershell ISE 中执行以下注释,
$MFAExchangeModule = ((Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps.0\") -Filter CreateExoPSSession.ps1 -Recurse ).FullName | Select-Object -Last 1)
#Importing Exchange MFA Module
. "$MFAExchangeModule"
Connect-EXOPSSession -UserPrincipalName Admin@Contoso.com
我已经使用 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 模块并通过该模块连接 运行 任何交换命令。我尝试在 windows powerShell ISE 中使用 Connect-EXOPSSession
cmdlet,但它不理解 cmdlet
我在导入 Exchange Online 模块时遇到以下情况,允许您使用 New-ExoPSSession 进行连接
Import-Module $((Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps.0\") -Filter Microsoft.Exchange.Management.ExoPowershellModule.dll -Recurse ).FullName|?{$_ -notmatch "_none_"}|select -First 1)
要将 Exchange online 与 MFA 连接,您需要安装 Microsoft 的 Exchange Online PowerShell 模块 (EXO)。
您可以从 Exchange 管理中心下载 EXO。
安装 EXO 后,在 Windows Powershell ISE 中执行以下注释,
$MFAExchangeModule = ((Get-ChildItem -Path $($env:LOCALAPPDATA+"\Apps.0\") -Filter CreateExoPSSession.ps1 -Recurse ).FullName | Select-Object -Last 1)
#Importing Exchange MFA Module
. "$MFAExchangeModule"
Connect-EXOPSSession -UserPrincipalName Admin@Contoso.com