GetLocalUser
Get-LocalUser is a PowerShell cmdlet used to retrieve local user accounts on the computer. It is part of the Microsoft.PowerShell.LocalAccounts module and is commonly employed for scripting local account management without relying on Active Directory.
The command returns objects that represent local accounts. Key properties include Name, Enabled, Description, and SID,
Usage examples illustrate common tasks: Get-LocalUser lists all local accounts; Get-LocalUser -Name 'Alice' retrieves a specific
Compatibility and scope: The cmdlet is available on Windows PowerShell 5.1 and PowerShell 7 implementations via
Limitations: Get-LocalUser operates on the local computer and requires appropriate permissions according to local security policies.
See also: Set-LocalUser, New-LocalUser, Remove-LocalUser, Get-LocalGroup, Net user.