Tuesday, November 10, 2015

Finding User Created Shared Outlook Calendars in Exchange


Source: http://powershell.org/wp/forums/topic/finding-user-created-shared-outlook-calendars-in-exchange/

Get-Mailbox | Get-MailboxFolderStatistics | Where-Object {$_.FolderType -eq 'User Created' -and $_.folderpath -like '/calendar/*'} | select identity, name | ft -wrap


by mikefrobbins at 2012-08-14 09:35:55
Is there a way with PowerShell to find user created outlook calendars in Exchange 2010 if I don't know the exact name of the calendar? Or maybe I know the exact name but I'm not sure which user created the calendar? Are wildcard searches possible?
If I know the username and the exact name of the calendar, I can use this command to validate it exists:
Get-MailboxCalendarFolder -Identity "username:\calendar\usercreatedCalendarName"
I can see the current permissions with the following command:
Get-MailboxFolderPermission -Identity "username:\calendar\usercreatedCalendarName"
Add Editor Permissions with this command:
Add-MailboxFolderPermission -Identity "username:\calendar\usercreatedCalendarName" -User usernameToAdd -AccessRights Editor
And remove a users access with this command:
Remove-MailboxFolderPermission -Identity "username:\calendar\usercreatedCalendarName" -User usernameToRemove
Example: Can you give Bill access to my management meeting calendar in Outlook? Ok, I have no access to the calendar in Outlook so I'm breaking out PowerShell and I know who I think the owner of the calendar is, but the name may not be exact. How can I return a list of all of John's user created calendars in Outlook by using PowerShell on the Exchange server? Yeah, I know there's better ways to have shared calendars, but we've all been there – users create this sort of stuff.
by MikePfeiffer at 2012-08-14 13:52:23
Hey Mike,
You can find all the user created folders using the Get-MailboxFolderStatistics cmdlet. For example:
Get-MailboxFolderStatistics administrator | Where-Object{$_.FolderType -eq 'User Created'}
This won't give you the folder type (e.g., calendar, etc.) for user created folders, but it will give you the path. This may help if they are nesting them under the default calendar folder in the mailbox.
by mikefrobbins at 2012-08-14 14:51:29
Thanks Mike! That got me started on the right track. It looks like I can do something like this for a very generic search of all mailboxes: (luckily we don't have thousands of mailboxes or this wouldn't be a good idea)
Get-Mailbox | Get-MailboxFolderStatistics | Where-Object {$_.FolderType -eq 'User Created' -and $_.folderpath -like '/calendar/*'} | select identity, name | ft -wrap
If I know the user, I can add it like in your example:
Get-MailboxFolderStatistics username | Where-Object {$_.FolderType -eq 'User Created' -and $_.folderpath -like '/calendar/*'} | select identity, name | ft -wrap
Or if I have some of the calendar name as in my example of "management meeting calendar", I can add it to the foldername path:
Get-Mailbox | Get-MailboxFolderStatistics | Where-Object {$_.FolderType -eq 'User Created' -and $_.folderpath -like '/calendar/*manage*meet*'} | select identity, name | ft -wrap

Source: http://powershell.org/wp/forums/topic/finding-user-created-shared-outlook-calendars-in-exchange/


1 comment:

  1. i read a lot of stuff and i found that the way of writing to clearifing that exactly want to say was very good so i am impressed and ilike to come again in future.. hotmail sign in

    ReplyDelete