description: Get a Configuration Manager resource. external help file: AdminUI.PS.dll-Help.xml Module Name: ConfigurationManager ms.date: 10/01/2020 schema: 2.0.0 title: Get-CMResource
Get a Configuration Manager resource.
Get-CMResource [-Fast] [[-ResourceId] <Int32>] [-ResourceType <ResourceType>] [-DisableWildcardHandling]
[-ForceWildcardHandling] [<CommonParameters>]
The Get-CMResource cmdlet gets a Configuration Manager resource, such as a device or a user.
For more complete data, use Get-CMDevice or Get-CMUser. For devices, it queries the SMS_R_System class. If you use Get-CMDevice -Resource
the output is the same as Get-CMResource.
Note
Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>
. For more information, see getting started.
This command gets the resource with the ID 2097152000 and doesn't return lazy properties.
Get-CMResource -ResourceID "2097152000" -Fast
This command gets all user resources.
Get-CMResource -ResourceType User
This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Add this parameter to not automatically refresh lazy properties. Lazy properties contain values that are relatively inefficient to retrieve. Getting these properties can cause additional network traffic and decrease cmdlet performance.
If you don't use this parameter, the cmdlet displays a warning. To disable this warning, set $CMPSSuppressFastNotUsedCheck = $true
.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
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
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the ID of a resource. For example, 16780010
.
Type: Int32
Parameter Sets: (All)
Aliases: Id
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the resource type.
Type: ResourceType
Parameter Sets: (All)
Aliases:
Accepted values: None, UnknownResource, UserGroup, User, System
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.