What Users Do You Want Listed from All Users



  • @scottalanmiller said in Managing Windows Local Users with PowerShell:

    @Obsolesce said in Managing Windows Local Users with PowerShell:

    Yeah but who wants to look at a list of like 50 system users before finding what they are really after. And the output is ugly AF tbh.

    You are struggling hard to make something really easy seem hard. Yes, it lists all of the users, not just some. Would you really want a list of only some users? Which ones?

    Not at all.

    New-localuser
    Get-localuser
    Remove-localuser

    All you need is the username afterwards. Super. Simple. Done.



  • You had said that the /etc/passwd table returned too many results. I asked that if you didn't want a list of all of the users on the system, how would you define an appropriate list to return as you obviously had to have some shortly list in mind to make the statement. I wanted to know, how would you describe a better return... which subset of users do you want returned when you query the userlist (everyone I know of what's all, not some kept secret.)

    You agree not all, but you didn't explain how you would determine which ones to display and which ones to hide. And if the Windows tools don't show all, how do you manage the secret accounts that those commands do not display? Are you saying that there is yet another set of PowerShell commands to manipulate the true local user list?

    Your response doesn't follow the discussion. Those are commands, not users.


Log in to reply