[玩转系统] 使用 Connect-IPPSSession 连接到安全与合规性 PowerShell
作者:精品下载站 日期:2024-12-14 05:53:32 浏览:14 分类:玩电脑
使用 Connect-IPPSSession 连接到安全与合规性 PowerShell
若要使用 PowerShell 连接到 Microsoft Defender 和 Microsoft Purview 合规性门户,需要使用 Exchange Online 中的 Connect-IPPSSession cmdlet。在本文中,您将了解如何使用 Connect-IPPSSession PowerShell cmdlet 连接到安全与合规中心。
如何连接到安全与合规性 PowerShell
执行运行 Connect-IPPSSession PowerShell cmdlet 所需的以下步骤。
1.安装Exchange在线管理模块
在开始之前,您需要安装 Exchange Online PowerShell 模块。
您可以通过以下方式安装 Exchange Online 管理模块:
- PowerShell获取
- PS资源获取
方法1.使用PowerShellGet
运行以下 PowerShell 命令来安装 Exchange Online 管理模块。
Install-Module -Name ExchangeOnlineManagement -Force
方法 2. 使用 Microsoft PowerShell PSResourceGet
运行 Install-PSResource cmdlet 以安装 Exchange Online 管理模块。
Install-PSResource -Name ExchangeOnlineManagement -Force
2. 连接到 Exchange Online PowerShell
要运行 PowerShell 命令,您必须连接到 Exchange Online PowerShell。
以管理员身份启动 Windows PowerShell 并运行 Connect-ExchangeOnline cmdlet。
Connect-ExchangeOnline
使用您的管理员凭据登录,无论是否启用了 MFA。
成功登录后,PowerShell 输出显示以下内容。
This V3 EXO PowerShell module contains new REST API backed Exchange Online cmdlets which doesn't require WinRM for Client-Server communication. You can now run these cmdlets after turning off WinRM Basic Auth in your client machine thus making it more secure.
Unlike the EXO* prefixed cmdlets, the cmdlets in this module support full functional parity with the RPS (V1) cmdlets.
V3 cmdlets in the downloaded module are resilient to transient failures, handling retries and throttling errors inherently.
REST backed EOP and SCC cmdlets are also available in the V3 module. Similar to EXO, the cmdlets can be run without WinRM basic auth enabled.
For more information check https://aka.ms/exov3-module
3. 连接到安全与合规性 PowerShell
然后,您需要再次连接并运行 Connect-IPPSSession PowerShell cmdlet。
Connect-IPPSSession
使用您的管理员凭据登录,无论启用或未启用 MFA。
PowerShell 输出显示以下结果。
We have made updates to move the SCC admin experience to REST-based APIs. In doing so, we will be deprecating the legacy Remote PowerShell (RPS) protocol starting July 15, 2023.
Benefits of REST-based cmdlets: improved security, WinRM no longer required for client-server communication, improved error handling.
The REST API has the same cmdlets available and feature parity with RPS(V1) cmdlets, so existing scripts and processes don't need to be updated. Simply using the new module will ensure REST is used rather than RPS.
For more information, go to https://aka.ms/exov3-module
现在,您已连接到安全与合规性 PowerShell。
注意:如果某些 PowerShell 命令仍然不起作用,则意味着您没有所需的权限。你可以在 Microsoft Defender 门户或 Microsoft Purview 合规门户中检查权限和角色。
Connect-IPPSSession cmdlet 错误
要使用 REST API 通过 Connect-IPPSSession 连接到安全与合规中心,您需要 EXO 3.2.0 及更高版本。
如果您没有 Exchange Online 管理模块 3.2.0 或更高版本,则在运行 Connect-IPPSSession cmdlet 时将会收到以下警告。
警告:您的连接已重定向到以下 URI:“https://eur06b.ps.compliance.protection.outlook.com/Powershell-LiveId?BasicAuthToOAuthConversion=true;PSVersion=7.4.1”
当您运行以下 cmdlet 时,您将收到错误消息。
New-ComplianceSearch -Name "Test Mailbox" -ExchangeLocation "[email protected]"
New-ComplianceSearch:术语“New-ComplianceSearch”不被识别为 cmdlet、函数、脚本文件或可执行程序的名称。检查名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。
如何修复 Connect-IPPSSession cmdlet 错误
要修复 PowerShell 中的 Connect-IPPSSession 错误,请按照以下步骤操作。
检查 Exchange Online 管理模块版本
有两种方法可以检查您安装的 EXO 版本,具体取决于您安装 Exchange Online Management 的方式。
方法一:使用Get-module
要检查是否有最新的 EXO 模块,请运行 Get-Module PowerShell cmdlet。
Get-Module -Name ExchangeOnlineManagement | Format-Table -Property Name, Version, ModuleType
PowerShell 输出显示 ExchangeOnlineManagement 模块的版本。
Name Version ModuleType
---- ------- ----------
ExchangeOnlineManagement 3.4.0 Script
方法 2:使用 Get-InstalledPSResource
要检查是否有最新的 EXO 模块,请运行 Get-InstalledPSResource PowerShell cmdlet。
Get-InstalledPSResource -Scope AllUsers
它显示了 ExchangeOnlineManagement 和您已安装的其他模块的列表。
Name Version Prerelease Repository Description
---- ------- ---------- ---------- -----------
ExchangeOnlineManagement 3.4.0 PSGallery This is a General Availability (GA) release of the Exchange Online Powershell V3 module.
Microsoft.Graph 2.12.0 PSGallery Microsoft Graph PowerShell module
更新 Exchange Online 管理模块
如果您已经安装了Exchange Online模块,则只需更新它即可。请始终更新最新的 Exchange Online 管理模块以运行 Connect-IPPSSession cmdlet。
注意:如果更新不起作用,请删除 Exchange Online 管理模块并退出所有 PowerShell 会话。接下来,启动 PowerShell 并安装 Exchange Online PowerShell 模块。
有两种方法可以更新 Exchange Online 管理模块,具体取决于您的安装方式。
方法一:使用PowerShellGet
要将 Exchange Online 模块更新到最新版本,请运行以下 PowerShell 命令。
Update-Module -Name ExchangeOnlineManagement -Force
方法 2:使用 Microsoft PowerShell PSResource
运行以下 PowerShell 命令以更新到最新版本的 Exchange Online 模块。
Install-PSResource ExchangeOnlineManagement -Reinstall -Scope AllUsers -TrustRepository
就是这样!
了解更多:安装 Microsoft Graph PowerShell 模块»
结论
您了解了如何在 Exchange Online PowerShell 中使用 Connect-IPPSSession cmdlet。您必须在 PowerShell 中安装并更新最新的 Exchange Online 管理模块版本。否则,在运行 Connect-IPPSSession cmdlet 时将会出现错误。
您喜欢这篇文章吗?您可能还喜欢连接到 Microsoft Graph PowerShell。不要忘记关注我们并分享这篇文章。
猜你还喜欢
- 03-30 [玩转系统] 如何用批处理实现关机,注销,重启和锁定计算机
- 02-14 [系统故障] Win10下报错:该文件没有与之关联的应用来执行该操作
- 01-07 [系统问题] Win10--解决锁屏后会断网的问题
- 01-02 [系统技巧] Windows系统如何关闭防火墙保姆式教程,超详细
- 12-15 [玩转系统] 如何在 Windows 10 和 11 上允许多个 RDP 会话
- 12-15 [玩转系统] 查找 Exchange/Microsoft 365 中不活动(未使用)的通讯组列表
- 12-15 [玩转系统] 如何在 Windows 上安装远程服务器管理工具 (RSAT)
- 12-15 [玩转系统] 如何在 Windows 上重置组策略设置
- 12-15 [玩转系统] 如何获取计算机上的本地管理员列表?
- 12-15 [玩转系统] 在 Visual Studio Code 中连接到 MS SQL Server 数据库
- 12-15 [玩转系统] 如何降级 Windows Server 版本或许可证
- 12-15 [玩转系统] 如何允许非管理员用户在 Windows 中启动/停止服务
取消回复欢迎 你 发表评论:
- 精品推荐!
-
- 最新文章
- 热门文章
- 热评文章
[影视] 黑道中人 Alto Knights(2025)剧情 犯罪 历史 电影
[古装剧] [七侠五义][全75集][WEB-MP4/76G][国语无字][1080P][焦恩俊经典]
[实用软件] 虚拟手机号 电话 验证码 注册
[电视剧] 安眠书店/你 第五季 You Season 5 (2025) 【全10集】
[电视剧] 棋士(2025) 4K 1080P【全22集】悬疑 犯罪 王宝强 陈明昊
[软件合集] 25年6月5日 精选软件22个
[软件合集] 25年6月4日 精选软件36个
[短剧] 2025年06月04日 精选+付费短剧推荐33部
[短剧] 2025年06月03日 精选+付费短剧推荐25部
[软件合集] 25年6月3日 精选软件44个
[剧集] [央视][笑傲江湖][2001][DVD-RMVB][高清][40集全]李亚鹏、许晴、苗乙乙
[电视剧] 欢乐颂.5部全 (2016-2024)
[电视剧] [突围] [45集全] [WEB-MP4/每集1.5GB] [国语/内嵌中文字幕] [4K-2160P] [无水印]
[影视] 【稀有资源】香港老片 艺坛照妖镜之96应召名册 (1996)
[剧集] 神经风云(2023)(完结).4K
[剧集] [BT] [TVB] [黑夜彩虹(2003)] [全21集] [粤语中字] [TV-RMVB]
[实用软件] 虚拟手机号 电话 验证码 注册
[资源] B站充电视频合集,包含多位重量级up主,全是大佬真金白银买来的~【99GB】
[影视] 内地绝版高清录像带 [mpg]
[书籍] 古今奇书禁书三教九流资料大合集 猎奇必备珍藏资源PDF版 1.14G
[电视剧] [突围] [45集全] [WEB-MP4/每集1.5GB] [国语/内嵌中文字幕] [4K-2160P] [无水印]
[剧集] [央视][笑傲江湖][2001][DVD-RMVB][高清][40集全]李亚鹏、许晴、苗乙乙
[电影] 美国队长4 4K原盘REMUX 杜比视界 内封简繁英双语字幕 49G
[电影] 死神来了(1-6)大合集!
[软件合集] 25年05月13日 精选软件16个
[精品软件] 25年05月15日 精选软件18个
[绝版资源] 南与北 第1-2季 合集 North and South (1985) /美国/豆瓣: 8.8[1080P][中文字幕]
[软件] 25年05月14日 精选软件57个
[短剧] 2025年05月14日 精选+付费短剧推荐39部
[短剧] 2025年05月15日 精选+付费短剧推荐36部
- 最新评论
-
- 热门tag