I was recently asked to figure out a silent method of adding our organization’s holiday’s to all users calendars. Following was my approach.
First I thought of looking for a client side solution. Everyone in our organization uses Outlook 2007 and outlook uses a file name outlook.hol for holiday configuration. Following is the format of file, it can be created using a simple text editor and can be distributed by an email or commandline (outlook.exe /hol holidayfilename)
[Country or Description] ###
Event or holiday description, yyyy/mm/dd
Event or holiday description, yyyy/mm/dd
read for more details
Above is not very clean for a large environment, so I was not too happy with this solution and started taking a different approach.
Definitely it would be so much easier doing it with Exchange Management Shell and finally I found my answer.
Here is what's needed for a great solution
Get-Mailbox –ResultSize Unlimited | Export-Mailbox –IncludeFolders ‘\Calendar’ –SubjectKeywords “Subject of the appointment” –DeleteContent
Hope this is useful!! Please comment.
First I thought of looking for a client side solution. Everyone in our organization uses Outlook 2007 and outlook uses a file name outlook.hol for holiday configuration. Following is the format of file, it can be created using a simple text editor and can be distributed by an email or commandline (outlook.exe /hol holidayfilename)
[Country or Description] ###
Event or holiday description, yyyy/mm/dd
Event or holiday description, yyyy/mm/dd
read for more details
Above is not very clean for a large environment, so I was not too happy with this solution and started taking a different approach.
Definitely it would be so much easier doing it with Exchange Management Shell and finally I found my answer.
Here is what's needed for a great solution
- Exchange Management Tools and Outlook 2007 installed on a 32bit machine
- Outlook 2007 to create a PST file
- Export-mailbox
- Import-mailbox
- First of all create all events for all holidays in a mailbox Calendar and export it to a PST file or Create a Calendar Item in a PST file with the name “Calendar” and create all events in it.
- On 32bit a machine where outlook 2007 is installed login with an Exchange Enterprise Admin account and open Exchange Management Shell then run the following
$users=Get-Mailbox –ResultSize Unlimited
Import-Mailbox $users –PSTFolderPath c:\pstfolder/pstfile.pst –IncludeFolders ‘\Calendar’
- Above will add all items from the PST File Calendar to all users’ calendars.
Get-Mailbox –ResultSize Unlimited | Export-Mailbox –IncludeFolders ‘\Calendar’ –SubjectKeywords “Subject of the appointment” –DeleteContent
Hope this is useful!! Please comment.