How can I get a list of accounts for users that have logged onto a machine?
<p>I am looking for a way, to find out, which users have ever been logged on a local windows 10 machine by using PowerShell.</p>

<p>By using</p>

<pre><code>Get-WmiObject -Class Win32_UserAccount -Filter  "LocalAccount='True'"
</code></pre>

<p>I get a list of users, but I think this is not complete, because there are more home directories than the list says.</p>