I need to get the names of all administrator accounts in Powershell, but this command
get-ciminstance -class win32_account | select name | where name -eq administrator
returns only the account with the name administrator, it doesn't recognize other admin users with different names
I have also tried
get-ciminstance -class win32_account | select name | where name -eq administrator*
but it doesn't return anything when I use the wildcard.
What do I need to change in order to get a list of admin users on my computer?