{"id":1255,"date":"2023-03-03T19:20:56","date_gmt":"2023-03-03T19:20:56","guid":{"rendered":"https:\/\/www.mozesoft.com\/blog\/?p=1255"},"modified":"2023-03-03T19:20:58","modified_gmt":"2023-03-03T19:20:58","slug":"how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell","status":"publish","type":"post","link":"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/","title":{"rendered":"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?"},"content":{"rendered":"\n<p>To get a list of mailboxes a user has access to in Exchange\/Microsoft 365 via PowerShell, follow these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Open the PowerShell command prompt with administrator privileges.<\/li><li>Connect to your Exchange\/Microsoft 365 account using the following command:                                                <code>$credential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/outlook.office365.com\/powershell-liveid\/ -Credential $credential -Authentication Basic -AllowRedirection Import-PSSession $Session -DisableNameChecking <\/code>                                                                                                               This will prompt you for your Exchange\/Microsoft 365 account credentials and establish a remote PowerShell session to your account.<\/li><li>Once connected, run the following command to get a list of mailboxes the user has access to:                                         <code>Get-Mailbox -ResultSize Unlimited | Get-MailboxPermission -User &lt;UserName> | Where-Object {$_.AccessRights -like \"*FullAccess*\"} | Select-Object Identity <\/code>Replace <code>&lt;UserName><\/code> with the name of the user you want to check access for.<\/li><li>This will return a list of mailboxes that the user has full access to.<\/li><\/ol>\n\n\n\n<p>Note: You may need to adjust your Exchange\/Microsoft 365 account permissions or PowerShell execution policy to perform this action. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>To get a list of mailboxes a user has access to in Exchange\/Microsoft 365 via PowerShell, follow these steps: Open the PowerShell command prompt with administrator privileges. Connect to your Exchange\/Microsoft 365 account using the following command: $credential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https:\/\/outlook.office365.com\/powershell-liveid\/ -Credential $credential -Authentication Basic -AllowRedirection Import-PSSession $Session -DisableNameChecking [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1255","post","type-post","status-publish","format-standard","hentry","category-office-365"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?<\/title>\n<meta name=\"description\" content=\"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?\" \/>\n<meta property=\"og:description\" content=\"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-03T19:20:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-03T19:20:58+00:00\" \/>\n<meta name=\"author\" content=\"Adsank\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Adsank\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/\"},\"author\":{\"name\":\"Adsank\",\"@id\":\"https:\/\/www.mozesoft.com\/blog\/#\/schema\/person\/79fc1ff8cfa9fe3f16bedffefc53359c\"},\"headline\":\"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?\",\"datePublished\":\"2023-03-03T19:20:56+00:00\",\"dateModified\":\"2023-03-03T19:20:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/\"},\"wordCount\":136,\"articleSection\":[\"Office 365\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/\",\"url\":\"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/\",\"name\":\"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?\",\"isPartOf\":{\"@id\":\"https:\/\/www.mozesoft.com\/blog\/#website\"},\"datePublished\":\"2023-03-03T19:20:56+00:00\",\"dateModified\":\"2023-03-03T19:20:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.mozesoft.com\/blog\/#\/schema\/person\/79fc1ff8cfa9fe3f16bedffefc53359c\"},\"description\":\"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell\",\"breadcrumb\":{\"@id\":\"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.mozesoft.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.mozesoft.com\/blog\/#website\",\"url\":\"https:\/\/www.mozesoft.com\/blog\/\",\"name\":\"Blog\",\"description\":\"IT Knowledgebase\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.mozesoft.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.mozesoft.com\/blog\/#\/schema\/person\/79fc1ff8cfa9fe3f16bedffefc53359c\",\"name\":\"Adsank\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mozesoft.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/16e1b860aa1c6c11b188d686f734c33318307888d91fee8cd1550025f1c788a0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/16e1b860aa1c6c11b188d686f734c33318307888d91fee8cd1550025f1c788a0?s=96&d=mm&r=g\",\"caption\":\"Adsank\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?","description":"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/","og_locale":"en_US","og_type":"article","og_title":"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?","og_description":"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell","og_url":"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/","og_site_name":"Blog","article_published_time":"2023-03-03T19:20:56+00:00","article_modified_time":"2023-03-03T19:20:58+00:00","author":"Adsank","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Adsank","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/#article","isPartOf":{"@id":"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/"},"author":{"name":"Adsank","@id":"https:\/\/www.mozesoft.com\/blog\/#\/schema\/person\/79fc1ff8cfa9fe3f16bedffefc53359c"},"headline":"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?","datePublished":"2023-03-03T19:20:56+00:00","dateModified":"2023-03-03T19:20:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/"},"wordCount":136,"articleSection":["Office 365"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/","url":"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/","name":"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?","isPartOf":{"@id":"https:\/\/www.mozesoft.com\/blog\/#website"},"datePublished":"2023-03-03T19:20:56+00:00","dateModified":"2023-03-03T19:20:58+00:00","author":{"@id":"https:\/\/www.mozesoft.com\/blog\/#\/schema\/person\/79fc1ff8cfa9fe3f16bedffefc53359c"},"description":"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell","breadcrumb":{"@id":"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.mozesoft.com\/blog\/how-to-get-a-list-of-mailboxes-a-user-has-access-to-in-exchange-microsoft-365-via-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mozesoft.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Get a List of Mailboxes a User Has Access to in Exchange\/Microsoft 365 via PowerShell?"}]},{"@type":"WebSite","@id":"https:\/\/www.mozesoft.com\/blog\/#website","url":"https:\/\/www.mozesoft.com\/blog\/","name":"Blog","description":"IT Knowledgebase","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mozesoft.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.mozesoft.com\/blog\/#\/schema\/person\/79fc1ff8cfa9fe3f16bedffefc53359c","name":"Adsank","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mozesoft.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/16e1b860aa1c6c11b188d686f734c33318307888d91fee8cd1550025f1c788a0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/16e1b860aa1c6c11b188d686f734c33318307888d91fee8cd1550025f1c788a0?s=96&d=mm&r=g","caption":"Adsank"}}]}},"_links":{"self":[{"href":"https:\/\/www.mozesoft.com\/blog\/wp-json\/wp\/v2\/posts\/1255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mozesoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mozesoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mozesoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mozesoft.com\/blog\/wp-json\/wp\/v2\/comments?post=1255"}],"version-history":[{"count":1,"href":"https:\/\/www.mozesoft.com\/blog\/wp-json\/wp\/v2\/posts\/1255\/revisions"}],"predecessor-version":[{"id":1256,"href":"https:\/\/www.mozesoft.com\/blog\/wp-json\/wp\/v2\/posts\/1255\/revisions\/1256"}],"wp:attachment":[{"href":"https:\/\/www.mozesoft.com\/blog\/wp-json\/wp\/v2\/media?parent=1255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mozesoft.com\/blog\/wp-json\/wp\/v2\/categories?post=1255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mozesoft.com\/blog\/wp-json\/wp\/v2\/tags?post=1255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}