Today, we'll see how to get a list of local accounts in Windows 10. If you have several user accounts in your operating system, or your PC is shared between you and your family members or with other people, some of them may be local accounts whereas others may be Microsoft accounts.
A Microsoft account connects to Microsoft services like OneDrive or Office 365 and various apps offering synchronization of your preferences and settings and uploading your locally stored data. The other one is the classic local account which is stored on your PC and does not upload or share anything to the cloud. Under a local account, you can still sign in to apps and services individually. The local account was the only type of account available in Windows prior to Windows 8.
To get a list of local accounts in Windows 10, you need to do the following.
- Open PowerShell.
- Type or copy-paste the following command into the PowerShell console:
Get-LocalUser
The command will produce the following output.
You can redirect its output directly to a file. For example, the command can be as follows:
Get-LocalUser > ([Environment]::GetFolderPath("Desktop")+"\local-users.txt")
Besides PowerShell, Windows 10 allows you to find out local accounts using its GUI tools. You can use the Local Users and Groups console or the Settings app.
Local Users and Groups
The Local Users and Groups console is a classic Windows app designed to manage user accounts. It may not present in all editions of Windows 10. If your Windows edition comes with this app, you can press Win + R shortcut keys on your keyboard and type the following in the run box:
lusrmgr.msc
Find Local User Accounts with Settings
- Open Settings.
- Go to Accounts -> Family & other people.
- There, you can find a list of all accounts created on your PC. Next to each account, its type is mentioned. See the following screenshot:
That's it. As you can see, Windows 10 gives you multiple methods to see a list of local user accounts, but the first one with PowerShell is the most flexible and useful, since it allows you to save the list to a file.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
Hello,
Nice one,
Question, How can i take this code [Get-LocalUser > ([Environment]::GetFolderPath(“Desktop”)+”\local-users.txt”)] and get the output to show name,enabled,lastlogondate.
example: paradigm,true,24/02/2022 09:56:00,winaero,false,21/01/2015 05:05:00