{"id":6146,"date":"2022-09-08T13:26:59","date_gmt":"2022-09-08T13:26:59","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=6146"},"modified":"2022-11-23T10:11:22","modified_gmt":"2022-11-23T10:11:22","slug":"flatten-proxyaddresses-array-for-export-from-get-azureadgroup","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/flatten-proxyaddresses-array-for-export-from-get-azureadgroup","title":{"rendered":"Flatten ProxyAddresses Array for Export from Get-AzureADGroup"},"content":{"rendered":"\n<p>ProxyAddresses is an array in Get-AzureADGroup , so doesn&#8217;t export to CSV nicely &#8220;System.Collections.Generic.List`1[System.String]&#8221;<\/p><p>Heres how to export and flatten the array<\/p><p>\n\n\n<div class=\"wp-block-wab-pastacode\">\n\t<div class=\"code-embed-wrapper\"> <pre class=\"language-markup code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markup code-embed-code\">Get-AzureADGroup -All $true | Select DisplayName, @{Name=&quot;MyArray&quot;;Expression={ $_.ProxyAddresses -join &quot;,&quot; }} | Export-Csv C:\\Temp\\Groups365.csv<\/code><\/pre> <div class=\"code-embed-infos\"> <\/div> <\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>ProxyAddresses is an array in Get-AzureADGroup , so doesn&#8217;t export to CSV nicely &#8220;System.Collections.Generic.List`1[System.String]&#8221;Heres how to export and flatten the array<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1912,3971,3970,3972],"class_list":["post-6146","post","type-post","status-publish","format-standard","hentry","category-research","tag-array","tag-flatten","tag-proxyaddresses","tag-system-collections-generic-list1system-string"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/6146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=6146"}],"version-history":[{"count":2,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/6146\/revisions"}],"predecessor-version":[{"id":6375,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/6146\/revisions\/6375"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=6146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=6146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=6146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}