Remove-CMObjectSecurityScope

Removes a security scope from a Configuration Manager object.

Syntax

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

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
Required:True
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[]
Required:True
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
Required:True
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
Required:True
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False