Get-CMObjectSecurityScope

Get the security scope for an object.

Syntax

Get-CMObjectSecurityScope
   -InputObject <IResultObject>
   [-Name <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMObjectSecurityScope
   [-Id <String>]
   -InputObject <IResultObject>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

Use this cmdlet to get the security scopes that are associated with a Configuration Manager object.

For more information on security scopes, see Fundamentals of role-based administration in Configuration Manager.

Note

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

Examples

Example 1: Get security scopes for an application

This command first gets the application object named Central app. It then uses the pipeline operator to pass the object to Get-CMObjectSecurityScope, which gets all security scopes associated with the application object.

Get-CMApplication -Name "Central app" | Get-CMObjectSecurityScope

Example 2: Get a security scope for a package

This command gets the security scope named Scope1 that is associated with the package with ID XYZ00001.

$pkg = Get-CMPackage -Id "XYZ00001"
Get-CMObjectSecurityScope -InputObject $pkg -Name "Scope1"

Parameters

-DisableWildcardHandling

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

-ForceWildcardHandling

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

-Id

Specify the ID of a security scope that's associated with a Configuration Manager object. This value is the CategoryID property, for example SMS00UNA for the Default scope.

Type:String
Aliases:CategoryId
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Specify a Configuration Manager object that's associated with a security scope. To get this object, use the Get cmdlet for the object type. For example, Get-CMApplication for app objects.

Type:IResultObject
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specify the name of a security scope that's associated with a Configuration Manager object.

Type:String
Aliases:CategoryName
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject[]

IResultObject

Notes

For more information on this return object and its properties, see SMS_SecuredCategory server WMI class.