Edit

Share via


Set-CMObjectSecurityScope

Add or remove security scopes for Configuration Manager objects. This cmdlet is deprecated.

Syntax

Default (Default)

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

Description

The Set-CMObjectSecurityScope cmdlet adds and removes security scopes for 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.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

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

PS XYZ:\> 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 XYZ:\> 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.

Parameters

-Action

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

  • AddMembership
  • RemoveMembership

Parameter properties

Type:SecurityScopeActionType
Default value:None
Accepted values:AddMembership, RemoveMembership
Supports wildcards:False
DontShow:False
Aliases:SecurityScopeAction

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

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

Parameter properties

Type:

IResultObject[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies a name of a security scope.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SecurityScopeName

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

System.Object