Set-CMObjectSecurityScope
Add or remove security scopes for Configuration Manager objects. This cmdlet is deprecated.
Set-CMObjectSecurityScope
-Action <SecurityScopeActionType>
-InputObject <IResultObject[]>
-Name <String>
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
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.
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.
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.
Specifies the action that this cmdlet takes on the security scope. Valid values are:
- AddMembership
- RemoveMembership
Type: | SecurityScopeActionType |
Aliases: | SecurityScopeAction |
Accepted values: | AddMembership, RemoveMembership |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies an array of Configuration Manager objects associated with a security scope.
Type: | IResultObject[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies a name of a security scope.
Type: | String |
Aliases: | SecurityScopeName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet doesn't run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Microsoft.ConfigurationManagement.ManagementProvider.IResultObject[]
System.Object