I'm trying to get the permission of the calendar folder on a set user, then export it to a CSV, so we can easily view the permissions.
When I run this command:
Get-Mailbox |
Get-MailboxPermission |
Select-Object AccessRights, User, Identity, IsValid |
Export-Csv -Path 'c:\Users\Connor\Desktop'
I get this error:
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