Share via


Remove-CMBoundaryGroup

Remove-CMBoundaryGroup

Removes a boundary group.

Syntax

Parameter Set: SearchByIdMandatory
Remove-CMBoundaryGroup -Id <String[]> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByNameMandatory
Remove-CMBoundaryGroup -Name <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Remove-CMBoundaryGroup -InputObject <IResultObject> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Remove-CMBoundaryGroup cmdlet removes a boundary group from Microsoft System Center 2012 Configuration Manager.

Parameters

-Force

Instructs the cmdlet to perform the operation without prompting for confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Id<String[]>

Specifies an array of identifiers (IDs) for one or more boundary groups.

Aliases

GroupId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<IResultObject>

Specifies an input object to this cmdlet. You can get the input object by using the Get-CMBoundaryGroup cmdlet.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a boundary group.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Remove a boundary group that is specified by its ID

This command removes a boundary group that is specified by its identifier. Because the Force parameter is not specified, you must confirm the action before it is performed.

PS C:\> Remove-CMBoundaryGroup –Id "16777219"

Example 2: Remove multiple boundary groups by using an InputObject

The first command uses the Get-CMBoundaryGroup to get multiple boundary groups that are specified by their names, and stores this data into the $BoundaryObj variable.

The second command identifies and removes the boundaries that are specified by using the input object $BoundaryObj. Because the Force parameter is not specified, you must confirm the action before it is performed.

PS C:\> $BoundaryObj = Get-CMBoundary –Name "BGroup01", "BGroup02" "BGroup03"
PS C:\> Remove-CMBoundary –InputObject $BoundaryObj

Get-CMBoundaryGroup

New-CMBoundaryGroup

Set-CMBoundaryGroup