Freigeben über


Update to the Export-CalendarProcessing tool

As luck would have it, I have one more update to deliver today.

One of my peers (shout out to Mike Manning) noticed that when using the ExportImport-CalendarProcessing tool, mailbox objects that have some special characters in them don't get processed correctly on the import function.  He did some troubleshooting and discovered if the objects were wrapped in quotes, that the import script chunked through them fine.

So, I set out to fix that.

And by fix it, I mean "fix the script in a way that it would process the mailboxes with special characters," not "fix the script in a way that the quotes would no longer work."

Mike was gracious enough to test it a few times over, and has given it the stamp of "approval until we find a new interesting issue."

On the lines in question:

The "old" way:
@{n='ResourceDelegates';e={$val1=@();foreach ($obj in $_.ResourceDelegates){ $val1 += (Get-Recipient $obj).PrimarySmtpAddress} $val1 -join ";"}},`

The "new" way:
@{ n = 'ResourceDelegates'; e = { $val1 = @(); foreach ($obj in $_.ResourceDelegates) { $val1 += (Get-Recipient $obj).PrimarySmtpAddress }; $val1 = """" + ($val1 -join '";"') + """"; $val1 } },`

As you can see, just had to add a bunch of "" marks in to the text as I add them to the array, and then join them together.

You can pick up the new tool in the same place as the old one: https://gallery.technet.microsoft.com/Export-and-Import-Calendar-123866af

Remember, exported data that you can't import is like a cow's opinion: it just doesn't matter.