Des del 2000 compartiendo sobre…

Managing Local Users and Groups in Windows 11 Using PowerShell

Reading time: 3 – 5 minutes

In today’s digital age, managing users and groups efficiently is essential for smooth computer operations. Windows 11, Microsoft’s latest OS, offers robust tools for this purpose. One of these is PowerShell, which allows for streamlined user and group management. Below, we dive deep into managing local users and groups using PowerShell in Windows 11.

1. Get Local Users List Using PowerShell

To retrieve a list of local users:


2. Getting User List, Local and Non-local

For a comprehensive list that includes both local and non-local users, combine local user data with Active Directory information:

Get-LocalUser Get-ADUser -Filter *

(Note: The latter command requires the Active Directory module.)

3. Add and Remove User Using PowerShell

  • Adding a User:
New-LocalUser -Name "Username" -Description "Description of the User" -NoPassword
  • Removing a User:
Remove-LocalUser -Name "Username"

4. Manage Groups Using PowerShell

  • View all local groups:
  • Create a new group:
New-LocalGroup -Name "GroupName" -Description "Description of the Group"
  • Remove a group:
Remove-LocalGroup -Name "GroupName"

5. Manage Group Members Using PowerShell

  • Add a member to a group:
Add-LocalGroupMember -Group "GroupName" -Member "Username"
  • Remove a member from a group:
Remove-LocalGroupMember -Group "GroupName" -Member "Username"
  • View members of a group:
Get-LocalGroupMember -Group "GroupName"

Comments are closed.

Últimas entradas

Add a New Dropdown Menu in OpenWRT LUCI

Reading time: 3 – 5 minutes OpenWRT, the popular open-source Linux operating system designed for embedded devices, offers the LUCI interface for easy configuration and management. LUCI is essentially the web interface for OpenWRT, and while it’s already feature-rich, sometimes

Leer más »