title: How to list all AD Users and AD Computers together?
body: <p>I am trying to figure out how to export all AD Users with their hostname with PowerShell.</p>
  
  <p>I can type:</p>
  
  <pre><code>Get-ADComputer -Filter * -Properties Name, ipv4address, OperatingSystem, OperatingSystemVersion -SearchBase "DC=my,DC=domain,DC=com" -Server "my.domain.com" | Format-Table Name, OperatingSystem, ipv4*
  </code></pre>
  
  <p>The result of this will give me all of the hostnames, OS and IP addresses in my Domain.</p>
  
  <p>But how do I add AD users (last logged on user) to this list?</p>