Remove-EntraGroup
Removes a group.
Syntax
Default (Default)
Remove-EntraGroup
-GroupId <String>
[<CommonParameters>]
Description
The Remove-EntraGroup
cmdlet removes a group from Microsoft Entra ID. Specify the GroupId
parameter removes a group.
Unified Group can be restored withing 30 days after deletion using the Restore-EntraBetaDeletedDirectoryObject
cmdlet. Security groups can't be restored after deletion.
Notes on permissions:
The following conditions apply for apps to delete role-assignable groups:
- For delegated scenarios, the app must be assigned the
RoleManagement.ReadWrite.Directory
delegated permission, and the calling user must be the creator of the group or be assigned at least the Privileged Role Administrator Microsoft Entra role. - For app-only scenarios, the calling app must be the owner of the group or be assigned the
RoleManagement.ReadWrite.Directory
application permission or be assigned at least the Privileged Role Administrator Microsoft Entra role.
Parameters
-GroupId
Specifies the object ID of a group in Microsoft Entra ID.
Parameter properties
Type: | System.String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | ObjectId |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.