New-FIMResource Cmdlet

The New-FIMResource cmdlet creates a new FIM resource object .

Syntax

New-FIMResource -Session <FIM session> -Type <type name> [-Attributes <attributes>] [-PassThru]
- or -
New-FIMResource -Session <FIM session> -Instance <instance> [-Attributes <attributes>] [-PassThru]
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.
<type name> is a string containing the name of the type of the object to create, e.g. "Person".
<attributes> is a hash table containing the names and values of the attributes to be stored with the newly created object. There is no way to provide multiple values for a multi-valued attribute at creation time; you have to create the object with one initial value for the multi-valued attribute, and then use the Set-FIMResource cmdlet to add additional values. Also not there is currently no way to provide initial attribute values in other than the default locale. These are both bugs.
-PassThru is a boolean parameter that indicates that the newly create obejct should be written to the PowerShell pipeline. Note that the object placed in the pipeline is NOT reread from the FIM web service; it is the object provided to the web service to create the new resource. The object in the pipeline will not contain any of the attributes initialized by the web service itself. This could be considered a bug.
<instance> is an existing FIM resource used to initialize the attributes of the new FIM resource. This instance can come from the Get-FIMResource cmdlet.

Programming notes

The New-FIMResource cmdlet is implemented in the NewFIMResource.cs source file.

The New-FIMResource cmdlet does not currently observe the PowerShell "should process" parameter. This is a bug.

Last edited May 11, 2010 at 11:06 PM by gkirkpatrick, version 1

Comments

No comments yet.