 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a new local group using PowerShell?
To create a new local group on the local or the remote system using PowerShell, we can use the NewLocalGroup command.
Example
New-LocalGroup -Name "TestGroup" -Description "Test Group"
Output
Name Description ---- ----------- TestGroup Test Group
You can verify it from the Computer Management GUI.

To create the local group on the remote systems, you can use Invoke-Command. For example,
Invoke-Command -ComputerName Test1-Win2k12,Test1-Win2k16 -ScriptBlock{    New-LocalGroup -Name 'TestGroup' -Description 'New Test Group' } The above command will create a New Local group named ‘TestGroup’ on the remote systems, Test1-Win2k12, and Test1-Win2k16.
New-LocalGroup command is available in the module Microsoft.PowerShell.LocalAccounts which is part of the PowerShell version 5.1 or higher versions. If you have the older PowerShell version system then you can use the cmd command.
Net localgroup 'TestGroup2' /add
For the remote servers,
Invoke-Command -ComputerName Test1-Win2k12, Test1-Win2k16 -ScriptBlock{    Net Localgroup ‘TestGroup2’ /add }Advertisements
 