PowerShell search for computer name using logged-in UserName in the domain

I need help

I want to search with Powershell for computer name using logged-in UserName in the domain

example of searching logged name using the computer name

Get-WmiObject -Class win32_computersystem -ComputerName C0000169 | select username
How can I Reverse it?

First, would argue that Win32_ComputerSystem is not really the best method to see current sessions are on system. Reversing isn’t that simple. First thought is you would need to get DomainController audit information. Typically, this type of audit is used to see where someone is logged in when their account is being locked out. This requires an audit of every domain controller for event 4624 in the eventlog:

https://www.netwrix.com/how_to_get_user_login_history.html