title: Remove blank lines Powershell output
body: <p>I wrote a script to find GID's in AD, this is working fine, the issue I'm having is filtering out the blank (null lines)</p>
  
  <pre><code> $searcher=[adsisearcher]"(objectCategory=user)"
  $result = $searcher.FindAll()
  $result | Select-Object @{Name="DN";Expression+{$_.properties.distinguishedname}},@{Name="gid";Expression={$_.properties.gidnumber }} |Sort-Object -Property gid 
  </code></pre>