Set-CMSecurityScope
Set-CMSecurityScope
Changes configuration settings of a security scope.
Syntax
Parameter Set: SetById
Set-CMSecurityScope -Id <String[]> [-Description <String> ] [-NewName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetByName
Set-CMSecurityScope -Name <String[]> [-Description <String> ] [-NewName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetByValue
Set-CMSecurityScope -InputObject <IResultObject> [-Description <String> ] [-NewName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-CMSecurityScope cmdlet changes configuration settings of a security scope. You can use this cmdlet to change the name and description of a security scope.
Parameters
-Description<String>
Specifies a description of a security scope.
Aliases |
CategoryDescription |
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 |
-NewName<String>
Specifies a new name for the security scope.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-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: Change the settings of a security scope by using an ID
This command renames the security scope that has the ID CM200001. The command changes the name to ScopeT03 and adds a description to the security scope.
PS C:\> Set-CMSecurityScope -ID "CM200001" -NewName "ScopeT03" -Description "Security scope for team 3."
Example 2: Change the settings of a security scope by using a name
This command renames the security scope named ScopeT01. The command changes the name to ScopeT03 and adds a description to the security scope.
PS C:\> Set-CMSecurityScope -Name "ScopeT01" -NewName "ScopeT03" -Description "Security scope for team 3."
Example 3: Change the settings of a security scope by using an object variable
The first command gets the security scope that has the ID CM200001 and stores it in the $Sscope variable.
The second command renames the security scope for the object stored in $Sscope. The command changes the name to ScopeT03 and adds a description to the security scope.
PS C:\> $Sscope = Get-CMSecurityScope -ID "CM200001"PS C:\>Set-CMSecurityScope -Inputobject $Sscope -NewName "ScopeT03" -Description "Security scope for team 3."