Set-Localgroup

Change a local security group.

Syntax
      Set-Localgroup -Description String
         { [-Name] String | [-InputObject] LocalGroup | [-SID] SecurityIdentifier }
            [-WhatIf] [-Confirm] [CommonParameters]

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

   -InputObject
       The security group object to be changed. To obtain a security group, use Get-LocalGroup.

   -name
       The name of the security group to be changed.

   -SID
       The security ID (SID) of the security group to be changed.

   -Confirm
       Prompt for confirmation before executing the command.

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

You can pipe a security group, string or a SID to this cmdlet.

Exampless

Change the description of the local security group called 'SecurityGroup64':

PS C:\> Set-LocalGroup -Name "SecurityGroup64" -Description "We know what we are, but know not what we may be."

“Three groups spend other people's money: children, thieves, politicians. All three need supervision” ~Dick Armey

Related PowerShell Cmdlets:

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


 
Copyright © 1999-2022 SS64.com
Some rights reserved