Add-​CM​Object​Security​Scope

Adds a security scope to an object.

Syntax

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

Description

The Add-CMObjectSecurityScope cmdlet adds security scope to a Microsoft System Center Configuration Manager object.

Examples

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

PS C:\> $Scope = New-CMSecurityScope -Name "Scope1" -Description "Security scope 1"
PS C:\> Get-CMApplication -Name "Application*" | Add-CMObjectSecurityScope -Scope $Scope

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

The second command gets all application objects that have a name beginning with "Application" and uses the pipeline operator to pass the objects to Add-CMObjectSecurityScope. Add-CMObjectSecurityScope adds the security scope stored in $Scope to each application object.

Example 2: Add a security scope to application objects

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

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

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 objects to which you want to assign 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 that this cmdlet adds. A security scope name can be Default or the name of a custom 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
-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