Export Calendar Perms for User Default - O365

Hi There,


Im pretty sure this is possible, seen a few variations of the required step, but nothing quite there yet.


Basically i need to export a CSV list of all mailboxes calendar Permissions for the user "Default"


I'm almost there, but might need abit of a helping hand to tidy off the command and get it working.


I'll show you were i started:

Get-Mailbox | ForEach-Object {Get-MailboxFolderPermission $_":\Calendar" -User Default} | Export-CSV C:\Temp\CSV1.csv

That essentially explains what i need to do, but ofcourse this command only works for one user at a time and that might take a while with 50+ users, but this causes a pipline error and only runs the command for one user and halts.


I think managed to tweak it to get the following, but ofcourse it stalls on line3 when and it asks for the command for 'ForEach-Object'

$Calendar = $_.alias + ":\Calendar" -Eq "Default"
$mailboxes = Get-mailbox -ResultSize Unlimited
$mailboxes | ForEach-Object
Export-CSV C:\Temp\CSV2.csv

Any help will be greatly appreciated!


Thanks


July 27th, 2015 9:23am

Apologies, it appears that my old Powershell was broken and didnt like multi line commands, ran and works perfectly now.

Thanks for this!

Free Windows Admin Tool Kit Click here and download it now
August 3rd, 2015 10:33am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics