Question marks and forwardslashes in Outlook folder names and how to use with Set-MailboxFolderPermission

Let's say I want to get/set permissions of a folder called "Done?" under Inbox.

Get-MailboxFolderPermission "user:\Inbox\Done?"

returns:

The operation couldn't be performed because 'user:\Inbox\Done?' couldn't be found.
    + CategoryInfo          : NotSpecified: (:) [Get-MailboxFolderPermission], ManagementObjectNotFoundException
    + FullyQualifiedErrorId : 5E04CCC9,Microsoft.Exchange.Management.StoreTasks.GetMailboxFolderPermission

tried ` as an escape character but didn't work either. This is on PS v2, Exchange 2010

Any help will be appriciated!

February 12th, 2015 12:35pm

Don't use illegal characters in folder names.

Free Windows Admin Tool Kit Click here and download it now
February 12th, 2015 1:15pm

I just test this and it works fine:

[PS] C:\scripts> Get-MailboxFolderPermission 'testuser:\inbox\test?'


RunspaceId   : 9e2c16c7-4002-4f89-81da-2c8c55c7ed93
FolderName   : Test?
User         : Default
AccessRights : {None}
Identity     : Default
IsValid      : True

RunspaceId   : 9e2c16c7-4002-4f89-81da-2c8c55c7ed93
FolderName   : Test?
User         : Anonymous
AccessRights : {None}
Identity     : Anonymous
IsValid      : True

February 12th, 2015 1:26pm

I think it is not a question mark after all. The Outlook folders contain forward slashes which are displayed as question marks. So when you pass that string to a set command, it throws an error because it can't find the path (because / becomes ?).

Free Windows Admin Tool Kit Click here and download it now
February 13th, 2015 3:48am

You have the wrong character set of language set.
February 13th, 2015 3:58am

So Exchange cmdlets translate "/" in Outlook folder names to [char]63743, which in turn shows up as "?" in the cmdlet output. So before I pass the folder paths to add-mailboxfolderpermission in my script, I now do the following:

$Folder = $Folder.FolderPath.Replace("/","\")
$Folder = $Folder.Replace([char]63743,"/")

and it works now. Credit goes to BradS in the comments section of this blog

http://blogs.technet.com/b/tips_from_the_inside/archive/2011/11/03/set-outlook-folder-permissions-using-powershell.aspx

So I don't think there's anything wrong with my language set

I still haven't found a way to pass a folder path that contains "\" in the actual name of a folder (to set/add permissions to). Hopefully there aren't too many users that name their folders with "\" in them but Outlook doesn't stop you from doing so.

PS. Forgot to mention that these "?" symbols were coming up in the output of Get-MailboxFolderStatistics

  • Edited by aguy12 3 minutes ago
Free Windows Admin Tool Kit Click here and download it now
February 13th, 2015 6:14am

So Exchange cmdlets translate "/" in Outlook folder names to [char]63743, which in turn shows up as "?" in the cmdlet output. So before I pass the folder paths to add-mailboxfolderpermission in my script, I now do the following:

$Folder = $Folder.FolderPath.Replace("/","\")
$Folder = $Folder.Replace([char]63743,"/")

and it works now. Credit goes to BradS in the comments section of this blog

http://blogs.technet.com/b/tips_from_the_inside/archive/2011/11/03/set-outlook-folder-permissions-using-powershell.aspx

So I don't think there's anything wrong with my language set

I still haven't found a way to pass a folder path that contains "\" in the actual name of a folder (to set/add permissions to). Hopefully there aren't too many users that name their folders with "\" in them but Outlook doesn't stop you from doing so.

February 13th, 2015 6:17am

Unfortunately that has nothing to do with what you asked.  The slashes referenced are not a question mark.  The question mark is not an issue as I have posted above.  If your language or locale are set wrong for Exchange 2010 or if you are not patched you may have issues with that.  If you run PowerShell v3 or later on Exchange it can give unexpected results pre-SP2.

Posting in the Exchange forum may help you sort this out.

Free Windows Admin Tool Kit Click here and download it now
February 13th, 2015 10:56am

So Exchange cmdlets translate "/" in Outlook folder names to [char]63743, which in turn shows up as "?" in the cmdlet output. So before I pass the folder paths to add-mailboxfolderpermission in my script, I now do the following:

$Folder = $Folder.FolderPath.Replace("/","\")
$Folder = $Folder.Replace([char]63743,"/")

and it works now. Credit goes to BradS in the comments section of this blog

http://blogs.technet.com/b/tips_from_the_inside/archive/2011/11/03/set-outlook-folder-permissions-using-powershell.aspx

So I don't think there's anything wrong with my language set

I still haven't found a way to pass a folder path that contains "\" in the actual name of a folder (to set/add permissions to). Hopefully there aren't too many users that name their folders with "\" in them but Outlook doesn't stop you from doing so.

PS. Forgot to mention that these "?" symbols were coming up in the output of Get-MailboxFolderStatistics

  • Edited by aguy12 Friday, February 13, 2015 11:28 AM
February 13th, 2015 2:13pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics