Remove-CMObjectSecurityScope

Removes a security scope from a Configuration Manager object.

Syntax

Remove-CMObjectSecurityScope
      [-Force]
      -Id <String>
      -InputObject <IResultObject[]>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMObjectSecurityScope
      [-Force]
      -InputObject <IResultObject[]>
      [-Name] <String>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-CMObjectSecurityScope
      [-Force]
      -InputObject <IResultObject[]>
      [-Scope] <IResultObject[]>
      [-DisableWildcardHandling]
      [-ForceWildcardHandling]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-CMObjectSecurityScope cmdlet removes a security scope from a Microsoft System Center Configuration Manager object.

Examples

Example 1: Remove a security scope from application objects by using the pipeline

PS C:\> $Scope = Get-CMSecurityScope -Name "Scope1"
PS C:\> Get-CMApplication -Name "Application*" | Remove-CMObjectSecurityScope -Scope $Scope -Force

The first command gets the security scope object named Scope1 and stores the object in the $Scope variable.

The second command gets all application objects that have a name that begins with Application and uses the pipeline operator to pass the objects to Remove-CMObjectSecurityScope. Remove-CMObjectSecurityScope removes the security scope stored in $Scope from each of the application objects. The Force parameter indicates that the user is not prompted before the security scope is removed.

Example 2: Remove a security scope from application objects

PS C:\> Remove-CMObjectSecurityScope -InputObject (Get-CMApplication -Name "Application*") -Name "Scope1" -Force

This command gets all application objects that have a name beginning with Application and removes the security scope named Scope1 from each application object. The Force parameter indicates that the user is not prompted before the security scope is removed.

Required Parameters

-Id

Specifies the ID of a security scope.

Type:String
Aliases:SecurityScopeId
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Specifies an array of Configuration Manager objects associated with a security scope.

Type:IResultObject[]
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of a security scope.

Type:String
Aliases:SecurityScopeName
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Scope

Specifies an array of security scopes.

Type:IResultObject[]
Aliases:SecurityScope, SecuredCategory, Scopes, SecurityScopes, SecuredCategories
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

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

Forces the command to run without asking for user confirmation.

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

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

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

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False