
{"id":111,"date":"2018-04-19T07:18:53","date_gmt":"2018-04-19T07:18:53","guid":{"rendered":"http:\/\/www.tygarbyte.com\/?p=111"},"modified":"2018-04-19T07:18:53","modified_gmt":"2018-04-19T07:18:53","slug":"you-can-add-calendar-permissions-using-powershell-for-users-using-the-following-command","status":"publish","type":"post","link":"https:\/\/www.tygarbyte.com\/index.php\/2018\/04\/19\/you-can-add-calendar-permissions-using-powershell-for-users-using-the-following-command\/","title":{"rendered":"You can add  Calendar Permissions Using Powershell for users using the following command"},"content":{"rendered":"<p>1#<br \/>\n$UserCredential = Get-Credential<\/p>\n<p>2#<br \/>\n$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/outlook.office365.com\/powershell-liveid\/ -Credential $UserCredential -Authentication Basic \u2013AllowRedirection<\/p>\n<p>3#<br \/>\nImport-PSSession $Session<\/p>\n<p>4#<br \/>\nGet-MailboxFolderPermission user1.name:\\calendar<\/p>\n<p>#5<br \/>\nAdd-MailboxFolderPermission user1.name:\\calendar \u2013user user2.name \u2013accessrights reviewer<br \/>\n(ie above gives user2 reviewer rights to user1 calendar )<\/p>\n<p>#6<br \/>\nSet-MailboxFolderPermission user1.name:\\calendar \u2013user user2.name \u2013accessrights editor<br \/>\n(Replacing user.name with the user\u2019s usernames)<\/p>\n<p>#7<br \/>\nRemove-MailboxFolderPermission user1.name:\\calendar \u2013user user2.name<\/p>\n<p>#8<br \/>\nRemove-PSSession $Session<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Send on behalf of etc<\/p>\n<p>&nbsp;<\/p>\n<p>if user2 needs to access user1\u2019s calendar<\/p>\n<p>Add-MailboxFolderPermission -identity \u201cuser1:\\calendar\u201d \u2013user \u201cuser2\u201d -AccessRights Reviewer<\/p>\n<p>the same can be done to give permission to a security group<\/p>\n<p>Add-MailboxFolderPermission -identity \u201cuser1:\\calendar\u201d \u2013user \u201cDomainName\\securitygroup\u201d -AccessRights Reviewer<\/p>\n<p>Below is the list of access rights and explanation<\/p>\n<p>None \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 FolderVisible<br \/>\nOwner \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 CreateItems, ReadItems, CreateSubfolders, FolderOwner, FolderContact, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems<br \/>\nPublishingEditor \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 CreateItems, ReadItems, CreateSubfolders, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems<br \/>\nEditor \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 CreateItems, ReadItems, FolderVisible, EditOwnedItems, EditAllItems, DeleteOwnedItems, DeleteAllItems<br \/>\nPublishingAuthor \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CreateItems, ReadItems, CreateSubfolders, FolderVisible, EditOwnedItems, DeleteOwnedItems<br \/>\nAuthor \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CreateItems, ReadItems, FolderVisible, EditOwnedItems, DeleteOwnedItems<br \/>\nNonEditingAuthor \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 CreateItems, ReadItems, FolderVisible<br \/>\nReviewer \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 ReadItems, FolderVisible<br \/>\nContributor \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 CreateItems, FolderVisible<\/p>\n<p>Add-RecipientPermission user1@domain.com -AccessRights SendAs -Trustee user2@domain.com<\/p>\n<p>Add-RecipientPermission user1@domain.com -AccessRights SendAs -Trustee user2@domain.com<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1# $UserCredential = Get-Credential 2# $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/outlook.office365.com\/powershell-liveid\/ -Credential $UserCredential -Authentication Basic \u2013AllowRedirection 3# Import-PSSession $Session 4# Get-MailboxFolderPermission user1.name:\\calendar #5 Add-MailboxFolderPermission user1.name:\\calendar \u2013user user2.name \u2013accessrights reviewer (ie above gives user2 reviewer rights to user1 calendar ) #6 Set-MailboxFolderPermission user1.name:\\calendar \u2013user user2.name \u2013accessrights editor (Replacing user.name with the user\u2019s usernames) #7 Remove-MailboxFolderPermission [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/www.tygarbyte.com\/index.php\/wp-json\/wp\/v2\/posts\/111"}],"collection":[{"href":"https:\/\/www.tygarbyte.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tygarbyte.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tygarbyte.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tygarbyte.com\/index.php\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":1,"href":"https:\/\/www.tygarbyte.com\/index.php\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"predecessor-version":[{"id":112,"href":"https:\/\/www.tygarbyte.com\/index.php\/wp-json\/wp\/v2\/posts\/111\/revisions\/112"}],"wp:attachment":[{"href":"https:\/\/www.tygarbyte.com\/index.php\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tygarbyte.com\/index.php\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tygarbyte.com\/index.php\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}