Add Mailbox FolderPermission using Powershell Exchange 2010

JimmyRiverside
JimmyRiverside used Ask the Experts™
on
How to use PowerShell Command "Add-Mailbox FolderPermission" to Folder with Spaces in Name.

Example:

Add-MailboxFolderPermission -Identity "User1@xyz.com:\Inbox\AHA Emails to Staff" -User User2@xyz.com -AccessRights Owner

Every time I run this I get an error from powershell cannot find path ???
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Add-MailboxFolderPermission -Identity "User1@xyz.com:\Inbox\AHA` Emails` to` Staff" -User User2@xyz.com -AccessRights Owner

Use backticks before the space
Jeremy WeisingerSenior Network Consultant / Engineer

Commented:
Or just surround it with single quotes instead of double quotes.

Add-MailboxFolderPermission -Identity 'User1@xyz.com:\Inbox\AHA Emails to Staff' -User User2@xyz.com -AccessRights Owner

Open in new window

Raheman M. AbdulMessaging and Directory Services

Commented:
Try this:
Add-MailboxFolderPermission -Identity 'User1:\Inbox\AHA Emails to Staff' -User User2 -AccessRights Owner

Open in new window

or
$Folder = 'User1@xyz.com:\Inbox\AHA Emails to Staff'
Add-MailboxFolderPermission -Identity $Folder -User User2@xyz.com -AccessRights Owner

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial