# find all hidden mailboxes for whole AD  and show AD user&#8217;s Enabled/Disabled status, plus with location (in what OU) get-mailbox -resultsize unlimited | where {($_.IsMailboxEnabled -eq "True") -and ($_.HiddenFromAddressListsEnabled -eq "True" )} | select-object name, samaccountname, @{N="ADAccount-Is-Enabled"; E={(get-aduser -Identity $_.samaccountname).enabled}}, PrimarySmtpAddress, IsMailboxEnabled , HiddenFromAddressListsEnabled, OrganizationalUnit| export-csv -path c:\temp\hidden.csv -NoTypeInformation{"id":1504,"date":"2020-03-28T18:35:56","date_gmt":"2020-03-28T10:35:56","guid":{"rendered":"https:\/\/www.itforce.mn\/?p=1504"},"modified":"2020-03-28T19:22:06","modified_gmt":"2020-03-28T11:22:06","slug":"1504","status":"publish","type":"post","link":"https:\/\/www.itforce.mn\/index.php\/2020\/03\/28\/1504\/","title":{"rendered":"How to report all hidden mailboxes with related AD user Enable status"},"content":{"rendered":"<p><span style=\"color: #008000;\"># find all hidden mailboxes for whole AD\u00a0 and show AD user&#8217;s Enabled\/Disabled status, plus with location (in what OU)<\/span><\/p>\n<pre>get-mailbox -resultsize unlimited | where {($_.IsMailboxEnabled -eq \"True\") -and ($_.HiddenFromAddressListsEnabled -eq \"True\" )} | select-object name, samaccountname, @{N=\"ADAccount-Is-Enabled\"; E={(get-aduser -Identity $_.samaccountname).enabled}}, PrimarySmtpAddress, IsMailboxEnabled , HiddenFromAddressListsEnabled, OrganizationalUnit| export-csv -path c:\\temp\\hidden.csv -NoTypeInformation\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":null,"protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,17],"tags":[],"class_list":["post-1504","post","type-post","status-publish","format-standard","hentry","category-exchange-server","category-powershell-tips"],"_links":{"self":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts\/1504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/comments?post=1504"}],"version-history":[{"count":3,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts\/1504\/revisions"}],"predecessor-version":[{"id":1507,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/posts\/1504\/revisions\/1507"}],"wp:attachment":[{"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/media?parent=1504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/categories?post=1504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itforce.mn\/index.php\/wp-json\/wp\/v2\/tags?post=1504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}