Finding the Active Account on the Remote Computer
Ps:
$computer=read-host "CumputerName/IP:" gwmi win32_computersystem -comp $computer | select USername,Caption,Manufacturer
This post is licensed under CC BY 4.0 by the author.
Ps:
$computer=read-host "CumputerName/IP:" gwmi win32_computersystem -comp $computer | select USername,Caption,Manufacturer