{"id":2509,"date":"2018-06-14T23:32:16","date_gmt":"2018-06-14T23:32:16","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2509"},"modified":"2018-06-14T23:32:35","modified_gmt":"2018-06-14T23:32:35","slug":"powershell-setting-permissions-for-office-365-using-powershell-to-user-another-users-mailbox","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2509","title":{"rendered":"PowerShell &#8211; Setting Permissions for Office 365 using Powershell to user another users Mailbox"},"content":{"rendered":"<p>To configure a user to view another users mailbox, follow these steps:<\/p>\n<p>&nbsp;<\/p>\n<p><b>1)<\/b>\u00a0This step will show you what your execution policy is on your computer. Depending on what execution policy you have will determine what scripts you can run.\u00a0Theresfore, it is important that you do this step before starting so that you are sure you can actually execute the scripts you&#8217;re about to use.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">get-executionpolicy<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>2)<\/b>\u00a0This step verifies that you are an administrator and will get you all the users that the administrator (that you are logging in as) is in control of, which will allow you to change their settings.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">= Get-Credential\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>3)<\/b>\u00a0This step will set the so that when you import it you will get all the scripts required from the outlook exchange server.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">= New-PSSession\u00a0-ConfigurationName\u00a0Microsoft.Exchange\u00a0-ConnectionUri\u00a0https:\/\/ps.outlook.com\/powershell\/\u00a0-Credential -Authentication Basic \u2013AllowRedirection\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>4)<\/b>\u00a0This step imports and the scripts that you are about to use.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">Import-PSSession\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>5)<\/b>\u00a0This step will set the permissions. &#8220;-identity&#8221; will be the persons mailbox that you want the other user to view and &#8220;-user&#8221; will be the user who you are setting the permissions. &#8220;-AccessRights&#8221; will be what the other user can view. Giving them\u00a0FullAccess\u00a0(like what has been done in this script) will give the other user full access to the mailbox. Remember to change the and with the respective users email addresses.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">Add-MailboxPermission\u00a0-Identity -User -AccessRights\u00a0FullAccess\u00a0-InheritanceType\u00a0All\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>6)<\/b>\u00a0This step is optional and not required, however it will confirm whether the permissions you&#8217;ve just added have been implemented.<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">Get-MailBoxPermission\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To configure a user to view another users mailbox, follow these steps: &nbsp; 1)\u00a0This step will show you what your execution policy is on your computer. Depending on what execution policy you have will determine what scripts you can run.\u00a0Theresfore, it is important that you do this step before starting so that you are sure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[],"class_list":["post-2509","post","type-post","status-publish","format-standard","hentry","category-powershell"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2509"}],"version-history":[{"count":2,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2509\/revisions"}],"predecessor-version":[{"id":2511,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2509\/revisions\/2511"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}