Как узнать список пользователей windows cmd

Windows — многопользовательская система, что означает, что в ней могут относительно независимо работать несколько пользователей. Помимо пользовательских учетных записей, создаваемых при установке и после, в системе предусмотрено несколько скрытых системных учетных записей. При необходимости вы можете получить список и тех и других.

В этой простой инструкции подробно о способах посмотреть список пользователей Windows 11 или Windows 10, большинство из которых подойдёт и для предыдущих версий системы. Если вам требуется получить список пользователей без входа в систему, обратите внимание на последний раздел этого материала.

Windows PowerShell или Терминал Windows

Если по той или иной причине вам потребовалось получить список всех пользователей Windows 11, Windows 10 или одной из предыдущих версий системы — сделать это можно как в графическом интерфейсе, так и средствами командной стройки или PowerShell.

Я рекомендую начать с PowerShell, так как он позволяет быстро получить максимум информации об учетных записях пользователей:

  1. Запустите Windows PowerShell или Терминал Windows от имени администратора, для этого можно нажать правой кнопкой мыши по кнопке «Пуск» и выбрать нужный пункт контекстного меню.
  2. Введите команду
    Get-LocalUser

    и нажмите Enter.

  3. В результате вы получите полный список учетных записей пользователей, а также информацию, включена ли учетная запись в столбце «Enabled».
    Получение списка пользователей в PowerShell

Обратите внимание, некоторые учетные записи могут вызвать вопросы, ответы на них можно найти в статьях:

  • Как включить скрытую системную учетную запись Администратор в Windows 11 (подойдет и для Windows 10)
  • Для чего нужна учетная запись WDAGUtilityAccount в Windows 11/10

Командная строка

Список пользователей Windows можно получить с помощью командной строки:

  1. Запустите командную строку (права администратора не обязательны).
  2. Введите команду
    net user

    и нажмите Enter, чтобы получить список всех пользователей.

    Команда net user в командной строке

  3. Ещё одни вариант команды:
    wmic useraccount get name
    Получение списка пользователей в командной строке

Оба варианта отобразят как активных, так и отключенных (скрытых) пользователей, но без информации, о том, что это за учетная запись и включена ли она. Второй вариант команды допускает следующую модификацию:

wmic useraccount get name,status

для просмотра информации о статусе учетных записей (для включенных — Ok, для отключенных — Degraded).

Параметры Windows 11 и Windows 10

«Основной», но не идеальный метод просмотра списка пользователей в графическом интерфейсе — приложение «Параметры»:

  1. Откройте «Параметры».
  2. В Windows 11 откройте раздел «Учетные записи» — «Другие пользователи» для того, чтобы посмотреть список пользователей, помимо текущего (и без отключенных и системных учетных записей).
    Список пользователей в параметрах Windows 11

  3. Если вы используете семейную группу (например, для родительского контроля Windows), пользователи, добавленные в семью, будут показаны не в «Другие пользователи», а в «Учетные записи» — «Семья».
    Члены семьи в параметрах Windows 11

  4. В Windows 10 откройте «Параметры» — «Учетные записи» — «Семья и другие пользователи». На открывшемся экране будут показаны пользователи компьютера (за исключением текущего), а также члены семейной группы при их наличии.
    Список пользователей в Параметрах Windows 10

Как в Windows 11, так и в Windows 10 в «Параметрах» вы не увидите отключенные учетные записи.

Локальные пользователи и группы

Ещё один вариант просмотра пользователей в графическом интерфейсе — оснастка «Локальные пользователи и группы».

  1. Нажмите клавиши Win+R на клавиатуре, либо нажмите правой кнопкой мыши по кнопке «Пуск» и выберите пункт «Выполнить». Введите lusrmgr.msc в диалоговое окно «Выполнить» и нажмите Enter.
  2. В открывшемся окне «Пользователи» вы сможете посмотреть список пользователей текущей системы, их статус (если рядом со значком отображается стрелка — пользователь отключен).
    Список пользователей в локальные пользователи и группы

  3. Дважды нажав по учетной записи пользователя, можно изменить её параметры (например, включить или отключить пользователя) и посмотреть описание.
    Настройка пользователей в локальные пользователи и группы

Некоторые дополнительные детали, которые могут пригодиться в части получения списка пользователей:

  • Если при использовании способов получения списка пользователей в командной строке или PowerShell вам требуется вывести список в файл, просто добавьте «> путь_к_файлу» через пробел после команды, например:
    wmic useraccount get name,status > spisok.txt

    Учитывайте, что путь (папка) в которую сохраняется файл должен существовать, а если для сохранения файла в указанном расположении требуются права администратора, консоль следует запускать с соответствующими правами.

  • При необходимости получить список пользователей без входа в систему в случае, если он невозможен, либо если система не запускается, вы можете использовать утилиты с WinPE, те же самые, которые описаны в последней части инструкции про сброс пароля Windows 11 (подойдет и для других версий системы).

Если у вас остаются вопросы, касающиеся просмотра списка пользователей Windows, вы можете задать их в комментариях ниже, описав ситуацию и задачу в деталях.

Содержание статьи:

  • Просмотр списка пользователей
    • Способ 1
    • Способ 2
    • Способ 3
    • Способ 4
    • Способ 5
  • Вопросы и ответы: 0

Вводная (описание задачи): при диагностике и настройке ОС Windows иногда требуется посмотреть всех пользователей, которые есть в системе (кстати, среди них  могут быть и скрытые учетные записи, которые вы сами не создавали). Сделать это можно разными способами, некоторые из них приведу ниже.

*

Примечание: в заметке приведены как универсальные способы, так и сугубо для современных Windows 10/11. Если у вас не работает один из них — попробуйте другой!

*

Просмотр списка пользователей

Способ 1

  1. нажать Win+R, чтобы появилось окно «Выполнить» (как на скрине ниже);
  2. ввести команду compmgmt.msc и нажать Enter (прим.: эта команда откроет окно управления компьютером);

    img-compmgmt.msc-----upravlenie-kompyuterom.png

    compmgmt.msc — управление компьютером

  3. далее необходимо открыть вкладку «Локальные пользователи и группы -> Пользователи»: в ней будет представлен весь список пользователей + описание;

    img-Lokalnyie-polzovateli-i-gruppyi.png

    Локальные пользователи и группы

  4. если какая-то учетная запись вам не нужна — ее можно удалить (для вызова соотв. опции — просто нажмите по учетной записи правой кнопкой мыши…). Важно: при удалении учетной записи — все файлы и документы, которые были с ней связаны, тоже будут удалены! См. скрин ниже. 👇

    img-SHHelchek-PKM-dlya-udaleniya-nenuzhnoy-uchetnoy-zapisi.png

    Щелчок ПКМ для удаления ненужной учетной записи

*

Способ 2

  1. сначала открыть командную строку от имени администратора (Win+R, команда CMD и нажать Ctrl+Shift+Enter);
  2. в открывшемся «черном окне» необходимо ввести net user и нажать Enter. Далее увидите список всех пользователей (см. рис. ниже).

    img-komanda-net-user-pokazhet-polzovateley.png

    команда net user покажет пользователей \\ командная строка

  3. кстати, можно воспользоваться и др. командой: wmic useraccount get name,status

    img-Polzovat-status-komandnaya-stroka.png

    Пользовать + статус (командная строка) // Статус Degraded обычно означает, что учетная запись существует, но вход в систему не выполнен (т.е. учетная запись ∼откл.).

*

Способ 3

  1. открываем терминал (можно кликнуть ПКМ по меню ПУСК…);

    img-PKM-po-pusku-terminal.png

    ПКМ по пуску — терминал

  2. далее вводим команду Get-LocalUser и нажимаем Enter: через 1-2 сек. получаем список (с описанием и статусом).

    img-Terminal-Windows-Get-LocalUser.png

    Терминал Windows — Get-LocalUser

*

Способ 4

  1. открываем параметры системы Windows 10/11 (обычно, достаточно нажать сочетание Win+i);
  2. переходим в раздел «Учетные записи / другие пользователи» (также можно заглянуть во вкладку «Семья», см. рис. ниже 👇);

    img-Parametryi-sistemyi-Windows-11-----uchetnyie-zapisi.png

    Параметры системы Windows 11 — учетные записи

  3. обратите внимание, что Windows покажет только активных пользователей (т.е. учетные записи со статусом «OK». Других пользователей — см. предыдущими способами).

    img-Drugie-polzovateli.png

    Другие пользователи

*

Способ 5

  1. сначала потребуется открыть контрольную панель (Win+R, команда control);
  2. далее перейти в раздел «Учетные записи пользователей»;

    img-Kontrolnaya-panel-uchetnyie-zapisi-polzovateley.png

    Контрольная панель — учетные записи пользователей

  3. в нем будет ссылка «Управление другой учетной записью» — делаем по ней ЛКМ;

    img-Upravlenie-drugoy-uchetnoy-zapisyu.png

    Управление другой учетной записью

  4. ву-а-ля! Список активных учетных записей перед нами… Кстати, из этого же окна вы можете изменить имя учетной записи, ее пароль, тип (и даже удалить!).

    img-Upravlenie-uchetnyimi-zapisyami.png

    Управление учетными записями

*

Дополнения и комментарии по теме — можно оставить через спец. форму ниже. 

Всего доброго!

👋

To list all users on a Windows system using the command prompt, you can utilize the `net user` command. Here’s the syntax:

net user

Understanding CMD Commands

What is CMD?

CMD, or Command Prompt, is a powerful command-line interface built into the Windows operating system that allows users to execute commands via text input. Unlike graphical user interfaces that require mouse clicks and visual navigation, CMD provides a straightforward text-based approach to interact with the system. This interface can perform a wide range of functions, from navigating files to managing user accounts, making it an invaluable tool for both administrators and advanced users.

Basics of CMD Syntax

Before diving into how to list all users in Windows CMD, it’s important to understand basic CMD syntax. Commands typically consist of the command verb followed by parameters and switches. For instance:

command_name [options] [parameters]
  • Command Name: This is the main instruction you want to execute.
  • Options: Modifiers that change the command’s behavior.
  • Parameters: Inputs required by the command.

Understanding this structure will help you effectively use commands, including those for managing user accounts.

List Users in Cmd: A Quick Guide for Beginners

List Users in Cmd: A Quick Guide for Beginners

Listing Users in Windows CMD

Why List Users?

Managing user accounts is crucial in a multi-user environment. Whether you are an IT administrator or a home user, knowing how to list all users in Windows CMD can assist you in tasks like monitoring user access, troubleshooting issues, or simply managing your system more effectively.

Using the «net user» Command

Command Overview

The `net user` command is a powerful tool for managing user accounts in Windows. This command allows you to create new users, delete existing ones, and importantly, to list all user accounts registered on your system.

How to List All Users

To list all users in CMD, simply use the following syntax:

net user

When you execute this command, you’ll receive a list of all user accounts on the local machine. The output typically displays usernames and whether they have administrative privileges.

Example Output:

User accounts for \\COMPUTER_NAME

-------------------------------------------------------------------------------
Administrator             User1                       
DefaultAccount            Guest                        
User2                    
The command completed successfully.

In this output, you clearly see the usernames listed, indicating the accounts available on your system.

Alternative Methods to Show Users

Using WMIC (Windows Management Instrumentation Command-line)

WMIC is another command-line interface that interfaces with Windows Management Instrumentation (WMI). Using WMIC allows for an alternative method to list users, often more succinctly. Here’s how:

wmic useraccount get name

This command will return a list of all user accounts on the system, displaying just the usernames without additional details.

Example Output:

Name
Administrator
Guest
User1
User2

This is particularly useful when you just need a simple list.

Using PowerShell from CMD

If you have a preference for PowerShell, you can run PowerShell commands directly from CMD for enhanced functionality. To list users using PowerShell, you can execute the following command:

Get-LocalUser

This command provides a detailed view of both local users and their status, offering more context about each account.

Sleep Windows Cmd: Mastering Sleep Commands in Cmd

Sleep Windows Cmd: Mastering Sleep Commands in Cmd

Understanding User Types

Local Users vs. Domain Users

When managing users, it’s important to distinguish between local users and domain users. Local users are accounts that only exist on a specific machine, whereas domain users are part of a network-controlled framework, managed by a server. Understanding this distinction will aid in effective user management for both environments.

Admin Users vs. Standard Users

Users can also be classified into admin users and standard users. Admin users possess elevated privileges, capable of making system-wide changes, while standard users are restricted to their own accounts. Identifying these user types can help maintain system security and stability.

Copy Folder Windows Cmd: A Quick How-To Guide

Copy Folder Windows Cmd: A Quick How-To Guide

Additional CMD Commands for User Management

Viewing User Properties

If you require specific details on a user account, you can use the following command format:

net user [username]

Replace `[username]` with the actual username. For example:

net user User1

This command reveals detailed information about the user account, including password status, group memberships, and account expiration details.

Deleting and Creating Users

Creating a New User

If you need to create a new user account, CMD makes it straightforward. Use the command:

net user username password /add

For example, if you want to create a user named “NewUser” with the password “Password123”, you would enter:

net user NewUser Password123 /add

This command facilitates account creation in a single step.

Deleting a User

If you need to delete a user account, ensure you fully understand the implications, as this action cannot be undone. Use the command:

net user username /delete

Example:

net user User1 /delete

Confirm deletion to maintain security and prevent unauthorized access.

List All Drives in Cmd: Quick Guide to Drive Management

List All Drives in Cmd: Quick Guide to Drive Management

Best Practices for User Management via CMD

Regular Audits

Regularly auditing user accounts helps maintain security and effective management. Make it a habit to list all users periodically, examining whether each account is necessary and monitoring access levels.

Security Considerations

Managing user privileges and roles effectively is vital for minimizing potential security threats. Always be aware of how many admin accounts you have and strive to limit their number to reduce security vulnerabilities.

List Folders in Cmd: A Quick Guide to Navigation

List Folders in Cmd: A Quick Guide to Navigation

Conclusion

Being able to list all users in Windows CMD empowers users and administrators alike to effectively manage accounts and maintain system integrity. The commands and methods discussed provide essential tools for anyone looking to streamline their user management practices in a Windows environment. Remember to continuously practice and utilize these commands to enhance your CMD proficiency and overall system management skills.

List All Files in Cmd: Your Quick Guide

List All Files in Cmd: Your Quick Guide

Resources and Further Reading

  • Official Microsoft documentation for CMD commands.
  • Online tutorials and community forums that cover advanced CMD usage.
  • Additional guides on user management best practices to stay informed on the latest methods and techniques.

Native Auditing

Netwrix Auditor for Windows Server

Steps

How to check users in Windows 10 and Windows 11 using PowerShell

  1. Create a file containing the computer list → Open the PowerShell ISE by clicking on the Start button and typing “PowerShell ISE”→ Run the following script, adjusting the file name and path for the export:

$computers=Get-Content-PathC:\data\computers.txt

Get-WmiObject-ComputerName$computers-ClassWin32_UserAccount-Filter»LocalAccount=’True'»|SelectPSComputername,Name,Status,Disabled,AccountType,Lockout,PasswordRequired,PasswordChangeable,SID|Export-csvC:\data\local_users.csv-NoTypeInformation 

  1. Open the file produced by the script in MS Excel.
A screenshot of a computer

Description automatically generated

The PowerShell script does not produce an output because we save the results in a CSV file. To see the results in the PowerShell window, remove the last part where we save the output in CSV, and add the switch format table, like below.

Get-WmiObject-ComputerName$computers-ClassWin32_UserAccount-Filter»LocalAccount=’True'»|SelectPSComputername,Name,Status,Disabled,AccountType,Lockout,PasswordRequired,PasswordChangeable,SID|format-table

Without the help of a format-table switch, the results would be shown user-by-user, expanding to multiple pages. Using the switch, the result will be formatted in a tabular form and will give you the output as below.

Get-LocalUser

The Get-LocalUser PowerShell cmdlet retrieves information about local user accounts on a Windows system. You can run this command in a PowerShell window to list local user accounts and their properties, including name, description, and status as enabled or disabled.

Get-LocalUser

This will display a list of local user accounts on the system in a row-wise manner; CMD lacks this by showing them randomly in one or two rows. Type “Get-LocalUser” in PowerShell and press Enter.

A screenshot of a computer screen

Description automatically generated

List local users in CMD

If you want to list Windows users who are currently logged in or have accounts on the system, you can use the net user command in the command prompt. This will list all user accounts on the system. Below is how to list users in cmd.

net user

This Windows command line will show users in cmd.

  1. Run Netwrix Auditor → Navigate to «Reports» → Expand the «Windows Server» section → Go to «Windows Server – State-in-Time» → Select «Local Users and Groups» → Click «View.». You can also search for reports.
  2. To save the report, click the «Export» button → Choose a format from the dropdown menu → Click «Save».

How to Check User Groups in Windows to Reduce Your Attack Surface Area

If an attacker or malware compromises a local user account, all resources the user can access across the network are vulnerable. Administrators limit the reach of attackers and malware by ensuring that users have access to only the resources they need to do their jobs, enhancing security. You can use native tools to get insight into local accounts and their properties. The easiest way is to use the “Computer Management” console for local users and groups. Another way is to get a list of Windows users with command line entries, but you must check user groups in Windows machines one at a time by entering ‘net user’ at the command line. Or, if you have the time and skills, you can create, test, and run a PowerShell script to get all local users on all Windows systems on your domain. 

Netwrix Auditor for Windows

Netwrix Auditor for Windows Server provides complete visibility into local users and groups across your entire IT environment, eliminating the need to use the command prompt on each computer or undertake time-consuming scripting. The software provides a comprehensive report that lists all local users on each server, the status of each user (enabled or disabled), and additional properties that give you more insight into potential security gaps, such as passwords that never expire, so you can take action to minimize your attack surface.

Skip to content

Windows – List all domain user accounts

Windows – List all domain user accounts

Would you like to learn how to list all domain user accounts using the command line? In this tutorial, we will show you how to use the command line to list all domain user accounts.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 2022
• Windows 10
• Windows 11

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

Windows Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Windows.

Tutorial Windows – List all domain user accounts

List all domain user accounts.

Here is the command output:

Send the command output to a text file.

List all domain user accounts using WMIC.

Here is the command output:

Replace the domain name with your domain.

List all domain user accounts using DSQUERY.

Replace the domain name with your domain.

In our example, we list all domain user accounts using the command line.

Congratulations! You are able to list domain accounts using the command-line.

VirtualCoin CISSP, PMP, CCNP, MCSE, LPIC22022-07-28T00:37:55-03:00

Related Posts

Page load link

This website uses cookies and third party services.

Ok

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Apc index mismatch windows server
  • Изменение значка пуск windows 10
  • Dla oem std windows
  • Что значит оптимизация диска windows 10
  • Intel dual band wireless ac 8265 driver windows 10