Remove-CMSecurityScope
Remove-CMSecurityScope
Removes a security scope.
Syntax
Parameter Set: SearchByIdMandatory
Remove-CMSecurityScope -Id <String[]> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SearchByNameMandatory
Remove-CMSecurityScope -Name <String[]> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SearchByValueMandatory
Remove-CMSecurityScope -InputObject <IResultObject> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Remove-CMSecurityScope cmdlet removes a security scope in Microsoft System Center 2012 SP1 Configuration Manager. Before you can remove a security scope, you must remove the association between administrative users and the security scope. You can use the Remove-CMSecurityScopeFromAdministrativeUser cmdlet to remove the association between a security scope and an administrative user.
Parameters
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Id<String[]>
Specifies an array of IDs of security scopes.
Aliases |
CategoryId |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-InputObject<IResultObject>
Specifies a CMSecurityScope object. To obtain a CMSecurityScope object, use the Get-CMSecurityScope cmdlet.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String[]>
Specifies an array of names of security scopes.
Aliases |
CategoryName |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
true |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Remove a security scope by using a name
This command removes the security scope named ScopeT02.
PS C:\> Remove-CMSecurityScope -Name "ScopeT02"
Example 2: Remove a security scope by using an ID
This command removes the security scope that has the ID CM100004.
PS C:\> Remove-CMSecurityScope -Id "CM100004"
Example 3: Remove a security scope by using an object variable
The first command gets the security scopes that have a name that starts with NewS and assigns the results to the $SecurityScope variable.
The second command removes the security scopes stored in the $SecurityScope variable.
PS C:\> $SecurityScope = Get-CMSecurityScope -Name NewS*
PS C:\> Remove-CMSecurityScope -InputObject $SecurityScope