Powershell: Check when a LOCAL user was last logged in.

Within Powershell you can also see when a LOCAL user was last logged in.
This can be done with the following one-liner:

$([ADSI]"WinNT://$env:COMPUTERNAME").Children | where {$_.SchemaClassName -eq 'user'} | ft name,lastlogin

example output:

 name                                                        lastlogin ----                                                        --------- {localadmin}                                                {28/09/2016 08:57:19} {nx}                                                        {05/01/2017 19:52:58} {Visitor}
Share your love