title: powershell Extract part of output
body: <p>Good day,</p>
  
  <p>I have a script that I wrote that gathers computer information from AD. 
  One specific property I am gathering is the MemberOf.  When I run the script it outputs the full path for the group that computer account is a member of. I want just the group name. Please see below:</p>
  
  <pre><code>get-qadcomputer -identity $computer | format-list -property Name, AccountIsDisabled, whenCreated, whenChanged, Description, AllMemberOf, ParentContainerDN
  </code></pre>
  
  <p>My output looks like:</p>
  
  <pre><code>Name              : SALESWS3381FPO
  AccountIsDisabled : False
  whenCreated       : 3/7/2018 9:44:07 AM
  whenChanged       : 12/24/2018 4:18:04 AM
  Description       : BLDG 589 FLR 2 RM 567
  AllMemberOf       : {CN=SALES-ADOBEPRO-Win10_COMPUTERS,OU=Security Groups,OU=Groups,OU=Site Specific
                      OUs,OU=sales,DC=example,DC=com}
  ParentContainerDN : OU=Bldg 589,OU=Desktops,OU=sales,DC=example,DC=com
  </code></pre>
  
  <p>So, for AllMemberOf, I want it to say   <strong>AllMemberOf: SALES-ADOBEPRO-Win10_Computers</strong></p>
  
  <p>We are running Active Roles Client on our machines.</p>