Andy Andy
asked on
Mailbox Folder permission on all folders and subfolders
Hello Team,
Can you please guide me how to give MailboxFolderpermission on folder and thier subfolders in one go to one user with accessrights suppose we take Owner.
Thanks,
andy
Can you please guide me how to give MailboxFolderpermission on folder and thier subfolders in one go to one user with accessrights suppose we take Owner.
Thanks,
andy
You can give full mailbox permission. That will automatically provide permission on all Folders.
ASKER
this is not i am looking for.. i need in inbox, only particular scripts sub-folder can take permissions
i am using below command, which is working fine. i need it read only one particular folder in inbox and give permission to user on all subfolders in it..
ForEach($f in (Get-MailboxFolderStatisti cs "ngupta2" | Where { $_.FolderPath.Contains("/I nbox") -eq $True } ) ) { $fname = "ngupta2:" + $f.FolderPath.Replace("/", "\"); Add-MailboxFolderPermissio n $fname -User "vchiu" -AccessRights Reviewer }
i am using below command, which is working fine. i need it read only one particular folder in inbox and give permission to user on all subfolders in it..
ForEach($f in (Get-MailboxFolderStatisti
ASKER
in inbox there is one subfolder and in that sub folder there are many subfolder.
so i need. it skip the inbox and give the necessary permissions to subfolder that i want.. if this get succedd. then the subfolder that having many subfolders it will automatically came
so i need. it skip the inbox and give the necessary permissions to subfolder that i want.. if this get succedd. then the subfolder that having many subfolders it will automatically came
Andi,
Explain to me what you are trying to do exactly and i will give you the correct command. Does userx need full permissions on usery's mailbox?
Explain to me what you are trying to do exactly and i will give you the correct command. Does userx need full permissions on usery's mailbox?
Add-MailboxFolderPermissio n -Identity emailaddressofthemailboxbe ingaccesse d:\NameofF olderyoune edtoaccess -User emailaddressofuseraccessin g -AccessRights Owner
ASKER
Hello Foxluv,
I will give you the Example.. Suppose i have parent folder Inbox ..OK... and in INBOX-->Test....OK
and Test having further sub folders
Now i want user X can have permission on user y mailbox on Test Folder and thier subfolders.... not all the folders in Inbox.... only Test and subfolders in it.
i run the command for inbox only and it is working perfectly fine.. and it giving permission to all subfolders in it... But my question in 1st paragraph is little different.
Hope this clarify you, i use below command.. i am not script master..so need help in this.
ForEach($f in (Get-MailboxFolderStatisti cs "userx" | Where { $_.FolderPath.Contains("/I nbox") -eq $True } ) ) { $fname = "userx:" + $f.FolderPath.Replace("/", "\"); Add-MailboxFolderPermissio n $fname -User "usery" -AccessRights Reviewer }
I will give you the Example.. Suppose i have parent folder Inbox ..OK... and in INBOX-->Test....OK
and Test having further sub folders
Now i want user X can have permission on user y mailbox on Test Folder and thier subfolders.... not all the folders in Inbox.... only Test and subfolders in it.
i run the command for inbox only and it is working perfectly fine.. and it giving permission to all subfolders in it... But my question in 1st paragraph is little different.
Hope this clarify you, i use below command.. i am not script master..so need help in this.
ForEach($f in (Get-MailboxFolderStatisti
Very well you can use the command I left you above.
Add-MailboxFolderPermissio n -Identity usery@domain.com:\Test -User userx@domain.com -AccessRights Reviewer
Add-MailboxFolderPermissio
ASKER
your is normal command.. this is somethign tricky one.. please see my comment
I think you are making this more complex then it needs to be. I beleive that I also provided an answer on another question as well regarding this. However you can do this using the syntax below....
For a single mailbox
For muultiple users
That should be all that is required.
Will.
For a single mailbox
Get-MailboxFolder -Identity user1:\inbox -recurse | add-mailboxFolderPermission -User user2 -AccessRights owner
For muultiple users
$User = "Administrator"
$Mailboxes = Get-Mailbox -ResultSize "unlimited"
ForEach ($Mailbox in $Mailboxes)
{
Get-MailboxFolder -Identity $Mailbox":\Inbox" -recurse | add-mailboxFolderPermission -User $User -AccessRights owner
}
That should be all that is required.
Will.
Andi, this is a very simple basic command which I have supplied you. Is this command necessary for one user or do you need many users to have access to the subfolder?
The way to accomplish this is by using the Get-MailboxFolder -Recurse switch and PIPING it to ADD-MAILBOXFOLDERPERMISSIO N which will get all of the subfolders under INOBX. it will then add the permissions to each folder. I have just tested this exact scenario in my lab and it works without any issue. I have used my exact script i have provided above.
Will.
Will.
Andi,
You can use Will's script but being that you don't need the inbox put the name of your subfolder after the backslash in his script
:\NameofSubfolder
You can use Will's script but being that you don't need the inbox put the name of your subfolder after the backslash in his script
:\NameofSubfolder
ASKER
Hello Will,
Get folder is not working on power shell.. your command is good yesterday that i asked in another question.
But here i asked somethign different... i dont need inbox.. i need the subfolder of it.
Please see my command in above comments.
i am just not able to make it as a subfolder instead of Inbox.
Hope this clarifies for both expert
Thanks,
Andy
Get folder is not working on power shell.. your command is good yesterday that i asked in another question.
But here i asked somethign different... i dont need inbox.. i need the subfolder of it.
Please see my command in above comments.
i am just not able to make it as a subfolder instead of Inbox.
Hope this clarifies for both expert
Thanks,
Andy
ASKER
Get mailbox folder is not working.. normally.. it showing mailbox does not exist.. but i can see all folders of mine.. when i run Get-Mailboxfolder command
Dont know,, if this is something due to any RBAC
Thanks
Dont know,, if this is something due to any RBAC
Thanks
Are you doing this in Exchange Management shell and do you have the proper permissions?
ASKER
hello fox
I run below command ..it did not run successfully
Get-MailboxFolder -Identity ngupta2:\scripts -recurse | add-mailboxFolderPermissio n -User vchiu -AccessRights owner
scripts is the subfolder in inbox
I run below command ..it did not run successfully
Get-MailboxFolder -Identity ngupta2:\scripts -recurse | add-mailboxFolderPermissio
scripts is the subfolder in inbox
ASKER
i am using windows powershel.. i am having rights..
i am in exchange 2013 environment
i am in exchange 2013 environment
Are you in the exchange management shell or just regular windows powershell?
I want you to run the command Get-excommand and let me know if you get a list of exchange commands.
ASKER
it is showing unrecognized commmand......
That's what I thought. You need to run the command from exchange management shell
If it isn't installed on that machine you can run the exchange install cd and just install the management tools, that will install the exchange management console and the exchange management shell on that machine you are using.
ASKER
i think you are not getting me.. there is no Exchange 2010 in my environment.. it is only Exchaneg 2013
and i usually do all administrative task using Windows Power shell.
and i usually do all administrative task using Windows Power shell.
Hopefully this works for you and we are all on the same page here...
I have modified my original script. it should be \inbox\whateverSubFolder and use the -recurse switch to get all of the folders under the "WhateverSubFolder" you have specified.
Will.
$User = "Administrator"
$Mailboxes = Get-Mailbox -ResultSize "unlimited"
ForEach ($Mailbox in $Mailboxes)
{
Get-MailboxFolder -Identity $Mailbox":\Inbox\WhateverSubFolder" -recurse | add-mailboxFolderPermission -User $User -AccessRights owner
}
I have modified my original script. it should be \inbox\whateverSubFolder and use the -recurse switch to get all of the folders under the "WhateverSubFolder" you have specified.
Will.
ASKER
in this where i need to mentioned identity user and user on which permission need to be applied
ASKER
Will, please help..w e are very near to resolution
I really appreciate your efforts in this.. i really need to accept the solution...i need closing comments now..
thank you
thanks,
Andy
I really appreciate your efforts in this.. i really need to accept the solution...i need closing comments now..
thank you
thanks,
Andy
ASKER
Will,
Can you please update the thread
Can you please update the thread
Andy,
I am not sure what more you are looking for?
Please let me know.
Will.
I am not sure what more you are looking for?
Please let me know.
Will.
ASKER
in your last update. where i need to mention the user i want to give permission and to which user it would be get assigned
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Will, You are Superrrr ...
It works like a Charm !!
Thanks you so much for all your support.... How can i specially request my questions to you.. Because what i see.. i get Response from Engineers very slow..
You are Really Awsum !!
Thanks,
Andy
It works like a Charm !!
Thanks you so much for all your support.... How can i specially request my questions to you.. Because what i see.. i get Response from Engineers very slow..
You are Really Awsum !!
Thanks,
Andy
ASKER
I want to give Speciall thanks to Will.
His work is Really commendable.. Every time he comment.. he gives one linner solution not moving his cursor here n there..
If i would get this kind of support from Experts-exchange.. I would be happy registered by myself for more years.. Even i am recommending for this Site to other users as well.. !!
Because I am Happy
Thnx
His work is Really commendable.. Every time he comment.. he gives one linner solution not moving his cursor here n there..
If i would get this kind of support from Experts-exchange.. I would be happy registered by myself for more years.. Even i am recommending for this Site to other users as well.. !!
Because I am Happy
Thnx
Thank you for that appreciate it <3 follow and support!
Will.
Will.