https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/get-localuser?view=powershell-5.1
Get-LocalUser (Microsoft.PowerShell.LocalAccounts) - PowerShell | Microsoft Learn
The Get-LocalUser cmdlet gets local user accounts. This cmdlet gets default built-in user accounts, local user accounts that you created, and local accounts...
microsoft powershellgetlearn