{"id":6122,"date":"2022-09-06T23:19:34","date_gmt":"2022-09-06T23:19:34","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=6122"},"modified":"2022-11-23T10:12:35","modified_gmt":"2022-11-23T10:12:35","slug":"powershell-get-azureadgroup-to-exclude-365-groups","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/powershell-get-azureadgroup-to-exclude-365-groups","title":{"rendered":"Powershell &#8211; Get-azureadgroup to exclude 365 groups"},"content":{"rendered":"<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\">#Gets all groups called GroupName<br\/><br\/>$Group= Get-AzureADGroup -SearchString &quot;GroupName&quot;<br\/><br\/>Uses Regex to filter out 365 groups with SPO in proxy name ( can&#039;t use -like and Where-Object as ProxyAddresses is an array\u00a0 , and not contain doesn&#039;t support wildcards :( )<br\/><br\/>\u00a0$Group= $Group | ?{$_.proxyaddresses -match &#039;.*SPO.*&#039;}<\/code><\/pre> <div class=\"code-embed-infos\"> <\/div> <\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1206,3955,1029,3951,3952,3953,3950,3954,3956,696],"class_list":["post-6122","post","type-post","status-publish","format-standard","hentry","category-research","tag-1206","tag-365-group","tag-exclude","tag-get-azureadgroup","tag-groups","tag-like","tag-match","tag-not-like","tag-notcontain","tag-regex"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/6122","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=6122"}],"version-history":[{"count":4,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/6122\/revisions"}],"predecessor-version":[{"id":6377,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/6122\/revisions\/6377"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=6122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=6122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=6122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}