Managing the Local Users and Groups using Windows PowerShell in Windows 10
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 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 on 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 an 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 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:
- Enabled : True
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.
Congratulations, you have just Managed the Local Users and Groups in Windows 10 all by yourself. If you would like to read more helpful articles and tips about various software and hardware visit errortools.com daily.
Now that’s how you Manage the Local Users and Groups in Windows 10 on a computer. On the other hand, if your computer is going through some system-related issues that have to get fixed, there is a one-click solution known as Restoro 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 a complete set of instructions in downloading and using it, refer to the steps below
Perform a full system scan using Restoro. To do so, follow the instructions below.