As you know, Windows PowerShell is a useful command-line utility in Windows 10 that can be used to manage the Local Users and Groups which affirms to the multiuser operating system principle of Windows 10. Although there are other GUI based utilities used to manage the Local Users and Groups, there are some system administrators that would still like to use the command-line utility to manage these Local Users and Groups. So in this post, you will be guided on how exactly you can manage the Local Users and Groups using PowerShell in your Windows 10 computer.

To get started, refer to the options provided below to manage both the Local Users and Groups using Windows PowerShell.

Option 1 – Manage the Local Users via Windows PowerShell

  • You need to first open Windows PowerShell as admin. To do that, just tap the Win + X keys and select the Windows PowerShell (Admin) option.
  • After opening PowerShell, you need to execute the “Get-LocalUser” cmdlet so that you can find all the details about all the local user accounts in your computer which would include the Account Name, Enabled status, as well as the description.

Note: On the other hand, you can also get the customized data about several objects that are related to your account. For instance, if you want to check when was the last time the Local account’s password was set, then you need to execute the “Get-LocalUser -Name root | Select-Object PasswordLastSet” cmdlet. Thus, the structure for this cmdlet is “Get-LocalUser -Name root | Select-Object *”.

Here are the objects you can use to get different sorts of data:

  • AccountExpires
  • Description
  • Enabled : True
  • FullName
  • PasswordChangeableDate
  • PasswordExpires
  • UserMayChangePassword
  • PasswordRequired
  • PasswordLastSet
  • LastLogon
  • Name
  • SID
  • PrincipalSource
  • ObjectClass

Option 2 – Manage the Local User Groups using Windows PowerShell

  • Like what you did earlier, open Windows PowerShell as admin and then execute the “Get-LocalGroup” cmdlet so you can get all the information about all the groups of all the local user accounts.
  • Now if you want to create a new Local User Group, just execute the “New-LocalGroup -Name <NAME OF THE GROUP> -Description ‘<ENTER THE DESCRIPTION OF THE GROUP HERE>’” cmdlet.
  • And if you want to add Local User Accounts to a specific group, just execute the “Add-LocalGroupMember -Group ‘<NAME OF THE GROUP’ -Member (‘NAME 1′,’NAME 2′,'<ROLE>’) -Verbose” cmdlet. You could also use the “Get-Localuser -Name john | Add-LocalGroupMember -Group ‘<NAME OF THE GROUP>’” cmdlet for the same purpose.
  • If you want to display all the User Accounts of a specific group, just use the “Get-LocalGroupMember –Group ‘ ’” cmdlet.
  • Now if you want to remove a local user account from a group, all you have to do is use the “Remove-LocalGroupMember -Group ‘<NAME OF THE GROUP>’ –Member <NAME OF THE LOCAL USER ACCOUNT>” cmdlet.

And that’s how you manage both the Local Users and Groups using Windows PowerShell. On the other hand, if your Windows 10 computer has some system-related issues that need to get fixed, there is a one-click solution known as Advanced System Repair you could check out to resolve them. This program is a useful tool that could repair corrupted registries and optimize your PC’s overall performance. Aside from that, it also cleans out your computer for any junk or corrupted files that help you eliminate any unwanted files from your system. This is basically a solution that’s within your grasp with just a click. It’s easy to use as it is user-friendly. For complete set of instructions in downloading and using it, refer to the steps below.

Perform a full system scan using ASR. To do so, follow the instructions below.

 

  1. Turn on your computer. If it’s already on, you have to reboot

  1. After that, the BIOS screen will be displayed, but if Windows pops up instead, reboot your computer and try again. Once you’re on the BIOS screen, repeat pressing F8, by doing so the Advanced Option shows up.
  1. To navigate the Advanced Option use the arrow keys and select Safe Mode with Networking then hit
  1. Windows will now load the Safe Mode with Networking.
  1. Press and hold both R key and Windows key.

  1. If done correctly, the Windows Run Box will show up.
  1. Type in the URL address in the Run dialog box and then tap Enter or click OK.
  1. After that, it will download the program. Wait for the download to finish and then open the launcher to install the program.
  1. Once the installation process is completed, run ASR to perform a full system scan.

  1. After the scan is completed click the “Fix, Clean & Optimize Now” button.