Say you create a hashtable like this, and you want to export it to a CSV file.
You might think you can just pipe it to Export-Csv, but as you will see if you try it, that does not produce the output you want. Here is what works instead.
Say you create a hashtable like this, and you want to export it to a CSV file.
You might think you can just pipe it to Export-Csv, but as you will see if you try it, that does not produce the output you want. Here is what works instead.
Note
The SmtpClient class used in this article is no longer recommended for new development. See the remarks section of the SmtpClient class reference for details. For new development, consider a library such as MailKit instead.
Note
This article reflects the state of Exchange Server 2016 at the time of its official release (October 2015). This article is kept as a historical record, so the content may differ from the current situation. In addition, extended support for Exchange Server 2016 ended on October 14, 2025, so it is no longer a supported product. Also, the Office Online Server mentioned in this article was later officially released in May 2016, but in October 2025 Microsoft announced that it will retire the product on December 31, 2026.
I wrote a script that takes the output of the Get-Mailbox command through the pipeline and sets calendar folder permissions. The reason is that I had long found the following things annoying.
You may also want to set the default permission on the calendar folder for every user in your organization. In that case, you do not know the calendar folder name in advance, so you need a bit of extra work.
Note
The SmtpClient class used in this article is no longer recommended for new development. See the remarks section of the SmtpClient class reference for details. For new development, consider a library such as MailKit instead.