Muokkaa

Jaa


Remove-MsolGroup

Removes a group from Azure Active Directory.

Syntax

Remove-MsolGroup
      -ObjectId <Guid>
      [-Force]
      [-TenantId <Guid>]
      [<CommonParameters>]

Description

The Remove-MsolGroup cmdlet deletes a group from Azure Active Directory.

Examples

Example 1: Remove a security group

PS C:\> $GroupId = Get-MsolGroup -SearchString "MyGroup"
PS C:\> Remove-MsolGroup -objectid $GroupId

The first command gets the security group that matches the string MyGroup, and then stores it in the $GroupId variable. The second command removes the group in $GroupId.

Parameters

-Force

Indicates that this cmdlet does not prompt you for confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ObjectId

Specifies the unique object ID of the group to remove.

Type:Guid
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-TenantId

Specifies the unique ID of the tenant on which to perform the operation. The default value is the tenant of the current user. This parameter applies only to partner users.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False