Currently PowerShell doesn’t have a builtin cmdlets for local users and groups. In order to manage local users groups using PowerShell, the ‘LocalAccount” module must be installed on Windows 10. This module allows you to managing local user accounts and Groups with PowerShell. I have tested this PowerShell module on Windows 10 and works perfectly. You can use the LocalAccount PowerShell module on other Windows clients and Windows Servers as well.
Manage Local Users Groups Using PowerShell
Before you begin to manage local users groups using PowerShell, you must install the LocalAccount module on your system. In order to install this module follow the step by step guide.
1. Start Windows PowerShell with the “Run as Administrator” and type “FIND-Module localaccount | INSTALL-Module” and press enter to start installing the module.
2. When prompts about installing prerequisite software for running localaccount module, type “Y” and press enter to accept it. Next one type “Y” to accept installing module.
3. Now the PowerShell localaccount module has been downloaded and installed successfully. Before you import the module, you need to change the policy to enable installing unsigned PowerShell scripts. To enable execute policy type “Set-ExecutePolicy RemoteSigned” and press enter.
This will allow you to run unsigned scripts that you write on your local computer or downloaded from internet.
Note: For security of you system, never download scripts from non-trusted repository for PowerShell.
4. Now you can import the localacount module using “Import-Module localaccount” command. Just type the command and press enter.
5. To list or retrieve the available commands of localaccount module, type “Get-Command -Module localaccount” and press enter.
That’s all commands of localaccount module. These commands are all pretty clear and undrestandable. Try to use them for managing Users and Groups with PowerShell on Windows 10 and Windows Server.
If you have any problem with these module, feel free to ask and share the issues you have with.
May I just say what a relief to uncover somebody who actually knows
what they are talking about over the internet. You certainly realize how to bring
an issue to light and make it important. More and more people ought to check this out
and understand this side of your story. I was surprised that you’re not more
popular because you certainly possess the gift.