Get-FIMResource Cmdlet

The Get-FIMResource cmdlet retrieves a resource object from the FIM service, either by specifying a XPath filter or an object ID.

Syntax

Get-FIMResource -Session <FIM session> -ObjectID <FIM object ID{> [-Attributes <attribute list>] [-Locale <locale>]
- or -
Get -FIMresource -Session <FIM session> -Filter <FIM filter> [-ResultSetSize <max size>] [-Attributes <attribute list>] [-Locale <locale>]
where:
<FIM session> is a FIMPSSession object returned by a previous invocation of New-FIMSession. A session is required, but it may be passed in via the pipeline.
<FIM object ID> is the unique resource identifier of the FIM resource you want to retrieve. It must be in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, e.g. 21EC2020-3AEA-1069-A2DD-08002B30309D
<attribute list> is a list of the attributes to retrieve separated by commas, e.g. "DisplayName,ObjectID". If unspecified, the cmdlet will return the set of attributes defined for the Resource class in the FIM schema. If <attribute list is the word "all", then the cmdlet will return all the attributes defined for the resource.
<locale> is the locale specifier to use when determine which attribute values to return. If not specified, the cmdlet returns the attributes stored with no locale specifier.
<FIM filter> is a valid XPath Filter Syntax expression specifying the resources to retrieve. Note that /* is not a valid XPath Filter Expression in the RTM version of FIM 2010.
<max size> is an integer specifying the maximum number elements to return. It is currently ignored.

Programming notes

The Get-FIMResource cmdlet is implemented in the GetFIMResource.cs source file. If the ObjectID switch is specified, the cmdlet uses the FIM Resource endpoint to retrieve the single object. If the Filter switch is specified, the cmdlet uses the FIM Enumeration endpoint to retrieve the objects matching the specified filter.

Last edited May 5, 2010 at 3:48 AM by gkirkpatrick, version 5

Comments

rlrcstr Dec 13, 2012 at 1:04 AM 
It seems that the -Attributes parameter doesn't work properly. I added -Attributes "DisplayName,Email" and Email always comes back empty. But if I use -Attributes "Email" then Email is populated. (Or -Attributes "All" - that gets Email, as well.)