Set-CMObjectSecurityScope

Sets the security scopes for Configuration Manager objects.

Syntax

Set-CMObjectSecurityScope
   -Action <SecurityScopeActionType>
   [-Confirm]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   -InputObject <IResultObject[]>
   -Name <String>
   [-WhatIf]
   [<CommonParameters>]

Description

The Set-CMObjectSecurityScope cmdlet adds and removes security scopes for Microsoft System Center Configuration Manager objects.

This cmdlet has been deprecated and may be removed in a future release. Use Add-CMObjectSecurityScope and Remove-CMObjectSecurityScope to add and remove security scopes from Configuration Manager objects.

Examples

Example 1: Add a security scope to application objects by using the pipeline

PS C:\> Get-CMApplication -Name "Application*" | Set-CMObjectSecurityScope -Action AddMembership -Name "Scope1"

This command gets all application objects that have a name beginning with Application and uses the pipeline operator to pass the objects to Set-CMObjectSecurityScope. Set-CMObjectSecurityScope adds the security scope named Scope1 to each application object.

Example 2: Add a security scope to application objects

PS C:\> Set-CMObjectSecurityScope -InputObject (Get-CMApplication -Name "Application*") -Action AddMembership -Name "Scope1"

This command gets all application objects that have a name beginning with Application and adds the security scope named Scope1 to each application object.

Required Parameters

-Action

Specifies the action that this cmdlet takes on the security scope. Valid values are: - AddMembership

  • RemoveMembership
Type:SecurityScopeActionType
Aliases:SecurityScopeAction
Parameter Sets:AddMembership, RemoveMembership
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 a name of a security scope.

Type:String
Aliases:SecurityScopeName
Required:True
Position:Named
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
-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