title: How can I check if a User Account group exists through powershell?
body: <p>Something like this : </p>
  
  <pre><code>if(GroupExists("Admins")) // &lt;-- How can I do this line ?
  {
      ([ADSI]"WinNT://$_/Admins,group").add($User)
  }
  else
  {
      $Group = Read-Host 'Enter the User Group :'
      ([ADSI]"WinNT://$_/$Group,group").add($User)
  }
  </code></pre>