I need a powershell command that can retrieve the last logged on user name to a computer.
this is Windows domain.
I found Powershell commands that retrieve current logged on user, but not the last logged on user if the computer has no one logged on to it at the current time.
If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.