I have this command
$remoteuserlist = Get-WmiObject Win32_UserAccount `
-filter \"LocalAccount =True\" –computername $PC -verbose
that I am run
If you have a bunch of old VBScript WMI queries laying around you can use the Get-WMIObject -Query param to reuse them.
$remoteuserlist = Get-WmiObject -query "SELECT * FROM Win32_UserAccount WHERE LocalAccount = 'True' and Name != 'Guest'" –computername $PC -verbose
Not groundbreaking but it can help if you don't want to rewrite queries.