Create a local security group in the Security Account Manager.

      New-Localgroup [-Description String] [-Name] String
         [-Confirm] [-WhatIf] [CommonParameters]

       Set a comment for the group. The maximum length is 48 characters.

       Set a name for the group. The maximum length is 256 characters.

       Prompt for confirmation before executing the command.

       Describe what would happen if you executed the command without actually executing the command.

You can pipe a string to this cmdlet.


Create a local security group called 'SecurityGroup64':

PS C:\> New-LocalGroup -Name "SecurityGroup64"

“All politics is local” ~ Thomas P. O'Neill

Related PowerShell Cmdlets

Add-LocalGroupMember - Add members to a local group.
Get-LocalGroup - Get the local security groups.
Remove-LocalGroup - Remove a local group.
Rename-LocalGroup - Rename a local group.
Set-Localgroup - Change a local security group.
New-ADGroup - add a domain group.
New-ADUser - Create a new AD user account.
New-LocalUser - Add a local user account.

Copyright © 1999-2024
Some rights reserved