Powershell Office 364审核日志:未将Search UnifiedAuditLog识别为cmdlet的名称

Powershell Office 364审核日志:未将Search UnifiedAuditLog识别为cmdlet的名称,powershell,automation,office365,Powershell,Automation,Office365,我试图通过PowerShell从Office 365读取审核日志,以便我们可以分析使用情况并自动更新数据: #创建/导入远程会话(无错误,无警告) $Session=New PSSession-ConfigurationName Microsoft.Exchange-ConnectionUrihttps://outlook.office365.com/powershell-liveid/ -凭证$UserCredential-身份验证基本-AllowerDirection 导入PSSession

我试图通过PowerShell从Office 365读取审核日志,以便我们可以分析使用情况并自动更新数据:

#创建/导入远程会话(无错误,无警告)
$Session=New PSSession-ConfigurationName Microsoft.Exchange-ConnectionUrihttps://outlook.office365.com/powershell-liveid/ -凭证$UserCredential-身份验证基本-AllowerDirection
导入PSSession$会话-DisableNameChecking-AllowClobber

Search UnifiedAuditLog-StartDate$StartDate-EndDate$EndDate-ResultSize 5000 35;我似乎缺少对Exchange的某些访问权限,这意味着某些命令对我是隐藏的。

其他cmdlet是否适用于您?e、 g.获取邮箱至少在我运行它们时,它们不会给出任何错误。如果我列出所有命令,我也会看到它们(Get-Mailbox、Get-UnifiedAuditSetting等),只是不搜索UnifiedAuditLog。我得到的是相同的错误。您能否提供您缺少的Exchange访问权限的一些详细信息?任何指示或方向都会有帮助。Thanks@skadam85您似乎必须具有exchange管理员权限。谢谢,这有助于提供指导。看起来我没有也不会被提供Exchange管理员访问权限。最后,我要求将我的帐户添加到具有“仅查看审核日志”访问级别的角色中。这也帮助我运行Search UnifiedAuditLog命令。
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.