Manage Local Users & Groups using Windows PowerShell
We will be now covering this guide in two parts. They are the following: To begin, you will need to open Windows PowerShell as an Administrator.
1] Managing Local Users
This cmdlet will help you to find all the details about all the local user accounts. These details will include the Account Name, Enabled status, and the description. The cmdlet is:
You can also get customized data about various objects related to your account. For example, we had used an object to check when was the Local account’s password was set last time. The cmdlet we used was: The skeleton for this cmdlet is: And you can use objects like the following to get different sorts of information curated just for you:
AccountExpiresDescriptionEnabled : TrueFullNamePasswordChangeableDatePasswordExpiresUserMayChangePasswordPasswordRequiredPasswordLastSetLastLogonNameSIDPrincipalSourceObjectClass
2] Managing the User Groups
This cmdlet will help you to find all the details about all the groups of the local user accounts:
If you wish to create a new Local User Group, use this cmdlet: Now, in order to add Local User Accounts to a particular group, you can use this cmdlet: Alternatively, this cmdlet can be used for the same reasons, too: And to display all the User Accounts that are a part of a particular group, use this command: Lastly, if you wish to remove a local user account from a group, use this cmdlet: These are some of the basic managing cmdlets for a user to manage Local Users and Groups using Windows PowerShell. I hope you found this guide useful.