script to give user A access to user B caelndar and task and which permissions to give

instead of using the Add-MailboxFolderPermission cmdlet, is there a script where i tell who calendar, who gets rights and what type of rights?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will SzymkowskiSenior Solution ArchitectCommented:
So basically you want a script where you can just type in the values and it applies the permissions?

ttrbrtsnAuthor Commented:
that would be very helpful, if not, ill just fill in the names in the  Add-MailboxFolderPermission command
Will SzymkowskiSenior Solution ArchitectCommented:
All you need to do is use the following command. You also have a similar question open where i already mentioned how to accomplish this using the commands themself.

Add-MailboxFolderPermission -Identity (read-host "type username example:"):\(read-host "type folder here example: Calendar") -User (read-host "type username example: user2") -AccessRights (read-host "type access right here example: owner")

Open in new window

Save the file with a .ps1 file extension. When you run the script it will prompt you for all of the details.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ttrbrtsnAuthor Commented:
A positional parameter cannot be found that accepts argument ':\'.
    + CategoryInfo          : InvalidArgument: (:) [Add-MailboxFolderPermission], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Add-MailboxFolderPermission
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.