title: PowerShell: Enabled status blank for get-adgroupmember
body: <p>The below script fetches all the Active Directory groups and their corresponding members, but my enabled status output is blank. </p>
  
  <p>I want to get the enabled status in the output along with the other 3 properties. </p>
  
  <p>I run my code as code.ps1 >> user.txt.</p>
  
  <pre><code>ForEach ($GroupName in (Get-ADGroup -Filter *))
   {
   "The AD Group $GroupName.Name members are:"
   Get-ADGroupMember -Identity $GroupName.Name | Select Name,samAccountName,Enabled,ObjectClass | Where {$_.ObjectClass -eq "user"} | Where {$_.Enabled -eq $true}
   "`n"
   }
  </code></pre>
  
  <p>Sample output:</p>
  
  <pre><code>Name                          samAccountName                Enabled                       ObjectClass                  
  ----                          --------------                -------                       -----------                  
  Iliyas Ismail                 ilismail                                                    user                         
  Ramesh Sengodan               rasengodan                                                  user 
  </code></pre>