1
votes

I am using IMAP to login my users to my organization's shared Office365 mailboxes from their iPhones and Android tablets, since I cannot use Exchange ActiveSync to allow these users to read the shared inbox from default email apps/Outlook for iOS/Android (confirmed by MSFT).

My users began to recieve this email regarding some of the folders in the mailbox:

The name of one or more of your folders includes the character "/" or more than 250 characters. Folders with names that include this character can't be downloaded to your IMAP e-mail program. Please rename these folders:

None of the listed folders are over 250 characters. They all contain "/". I'm not very experienced syntactically in powershell, but trying to improve. Is there a power-shell script that I could use to rename these folders and any subfolders to remove/replace the forward slashes? Please include any connection script i would need to use to connect remotely to O365.

Here is all of the research I have done so far. I was going to try to put something together tomorrow, but I thought I would also give the wonderful and talented people of SO a crack at it as well. Thanks for any help you can provide!

http://o365info.com/using-remote-powershell-to-manage_26

http://o365info.com/using-remote-powershell-to-manage_212

http://o365info.com/using-remote-powershell-to-manage_8596

http://o365info.com/shared-mailbox-powershell-commands

http://superuser.com/questions/900874/bulk-folder-renaming-powershell-script

http://powershell.org/wp/forums/topic/replace-special-characters/

http://blogs.microsoft.co.il/scriptfanatic/2011/08/15/exchange-removing-illegal-alias-characters-using-powershell/
1

1 Answers

-1
votes

Shared Mailboxes are so important and so difficult eh? I faced this issue recently, and was told by Microsoft Support that there is an unsupported technique for getting Shared Mailboxes to work on the iPhone's email app. The imap approach looks good though.

Look here to escape the forward slashes.

This is my template for connecting powershell to office 365 exchange.

Set-ExecutionPolicy RemoteSigned

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -  ConnectionUri https://outlook.office365.com/powershell-liveid/ 
-Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

# Exchange Mailbox commands go here e.g. $FixAutoMapping = Get-MailboxPermission sharedmailbox | where {$_.AccessRights -eq "FullAccess" -and $_.IsInherited -eq $false}

Remove-PSSession $Session