powershell - Office 364 审核日志:Search-UnifiedAuditLog 未被识别为 cmdlet 的名称
问题描述
我试图通过 PowerShell 从 Office 365 读取 AuditLogs,因此我们可以分析使用情况并自动更新数据:
# Create/Import remote session (no errors, no warnings)
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking -AllowClobber
Search-UnifiedAuditLog -StartDate $StartDate -EndDate $EndDate -ResultSize 5000 # <- Fails here
错误:
Search-UnifiedAuditLog : The term 'Search-UnifiedAuditLog' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
那个 cmdlet 是被删除了还是我错过了什么?
如果这不再有效,是否有另一种方法可以自动获取审核日志?
解决方案
我似乎缺少一些对 Exchange 的访问权限,这意味着某些命令对我来说是隐藏的。
推荐阅读
- wso2 - WSO2 IS 5.3.0 - 租户的管理员用户可以被锁定/禁用吗?
- asp.net - IIS 上的随机 500 错误
- reporting-services - 在 SSRS 中的查找中格式化字段
- dynamics-crm - CRM 2013 重新排序站点地图功能区中的实体
- .net-core - dotnet core webapi调用.net webapi2
- hash - 将 CRC32 值理解为除法余数
- docker - 在 macOS 上运行时,如何让 GitLab Runner 停止像 Linux 一样运行?
- json - 如何定义模式任意 JSON 对象?
- python-3.x - pandas 基于分布的系列抽样
- android - Android 和 iOS 中的 Nativescript 并发和低延迟音频