CmdID / PowerShell / Cmdlets / Rename
Rename-LocalGroup
Renames a local security group. PowerShell reference
From the PowerShell reference
6 parameters
Alias rnlg
What it does
Renames a local security group. The Rename-LocalGroup cmdlet renames a local security group. NOTE: The Microsoft.PowerShell.LocalAccounts module is not available in 32-bit PowerShell on a 64-bit system.
Rename-LocalGroup [-InputObject] <LocalGroup> [-NewName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]Rename-LocalGroup [-Name] <String> [-NewName] <String> [-WhatIf] [-Confirm] [<CommonParameters>]Rename-LocalGroup [-NewName] <String> [-SID] <SecurityIdentifier> [-WhatIf] [-Confirm] [<CommonParameters>]
Change the name of a group
PS C:> Rename-LocalGroup -Name "SecurityGroup" -NewName "SecurityGroup04"IdentifyIts page in the reference: Rename-LocalGroup.
Parameters
-InputObjectSpecifies the security group that this cmdlet renames. To obtain a security group, use the Get-LocalGroup cmdlet.-NameSpecifies the name of the security group that this cmdlet renames.-NewNameSpecifies a new name for the security group.-SIDSpecifies the security ID (SID) of a security group that this cmdlet renames.-ConfirmPrompts you for confirmation before running the cmdlet.-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.