Creating Subfolder in Outlook from Exchange 2010 SP1

Looking for a solution to create a Subfolder under User's folder in Outlook which should be visible for them. Want to do it from Exchange powershell. I was trying this down below and getting errors:

$mailboxes = Get-Mailbox -Server EX2KMBOX
$mailboxes | foreach { New-ManagedFolder -name $($_.Alias) -FolderName "$($_.Alias):\eBrochure" -StorageQuota '50Mb' -Comment 'Messages in this folder are retained for 2 Weeks' -MustDisplayComment $true }


And as I understand I'm totally wrong as it is creating set of custom managed folder which is not right.

Any advice on this?
Armen MinasyanDirector of ITAsked:
Who is Participating?
 
AkhaterConnect With a Mentor Commented:
OK I see you got no answers so I will try to  help

1) we have to start by creating a managed folder just one not one per user so
 New-ManagedFolder -name eBrochure -FolderName "eBrochure" -StorageQuota '50Mb' -Comment 'Messages in this folder are retained for 2 Weeks' -MustDisplayComment $true

2) Create a managed folder policy

New-ManagedFolderMailboxPolicy -Name "eBrochureFolderPolicy" -ManagedFolderLinks 'eBrochure'


3) apply it to the users


Set-Mailbox -Identity youmailbox -ManagedFolderMailboxPolicy "CeBrochureFolderPolicy"

of course if this works you can

$mailboxes = Get-Mailbox -Server EX2KMBOX
$mailboxes | Set-Mailbox -ManagedFolderMailboxPolicy "CeBrochureFolderPolicy"
0
 
Armen MinasyanDirector of ITAuthor Commented:
Tanks much! It works. But, I got one problem. I cannot apply Managed Folder Policy to the users with Archived Enabled. Is it any workaround?
0
 
AkhaterCommented:
honestly no idea :D can you give me the error so i can try to help
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
Armen MinasyanDirector of ITAuthor Commented:
Mailbox 'Armen Minasyan' cannot be Archive enabled with Managed Folders Policy. Archives are supported only with Retent
ion Policy.
    + CategoryInfo          : NotSpecified: (Armen Minasyan:ADUser) [Set-Mailbox], RecipientTaskException
    + FullyQualifiedErrorId : 397C31E4,Microsoft.Exchange.Management.RecipientTasks.SetMailbox
0
 
AkhaterCommented:
well I guess not it clearly says it is not supported
0
 
Armen MinasyanDirector of ITAuthor Commented:
Thanks for your help! You're saved my day!
0
 
AkhaterCommented:
glad I was able to help
0
 
Armen MinasyanDirector of ITAuthor Commented:
BTW, instead of ManagedFolderMailboxPolicy I applied retention policy to it and enable archive. So, it is totally resolved - Thanks to Akhater.
0
 
AkhaterCommented:
great find! Tx for the update
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.