Answer the question
In order to leave comments, you need to log in
How to find local legacy user accounts?
Hello!
There is a terminal server with local accounts, there are a lot of them, which of them are relevant is not entirely clear.
The task is to find out when the last time you logged in under the account.
I didn't find anything by googling, maybe someone solved a similar problem, and knows the answer?
Answer the question
In order to leave comments, you need to log in
You can read the lastLogon user attributes through PowerShell.
$Computername = $env:COMPUTERNAME
$adsi = [ADSI]"WinNT://$Computername"
$Users = $adsi.Children | where {$_.SchemaClassName -eq 'user'}
$Users | % {
$_ | Select Name, LastLogin
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question