我正在尝试获取设置用户的日历文件夹的权限,然后将其导出为 CSV,以便我们可以轻松查看权限。
当我运行这个命令时:
Get-Mailbox |
Get-MailboxPermission |
Select-Object AccessRights, User, Identity, IsValid |
Export-Csv -Path 'c:\Users\Connor\Desktop'
我收到此错误:
Export-Csv : Access to the path 'C:\Users\Connor\Desktop' is denied.
At line:1 char:89
+ ... hts,User,Identity,IsValid | Export-Csv -Path 'c:\Users\Connor\Desktop'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Export-Csv], UnauthorizedAccessException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ExportCsvCommand