Clearing a reference field

Mar 20, 2014 at 9:30 AM

I would like to clear a single-value attribute (like Manager). I tried with the following but it didn't work :
New-FimImportObject -ObjectType Person -State Put -AnchorPairs @{ObjectID=$usrattr.ObjectID.Substring(9)} -Changes @(
New-FimImportChange -Operation Replace -AttributeName 'Manager' -AttributeValue " " )-ApplyNow

and I even tried :
$ressource = ModifyImportObject -objectType "Person" -TargetIdentifier $usrattr.ObjectID
SetSingleValue -ImportObject $ressource -AttributeName 'Manager' -NewAttributeValue ""
Import-FIMConfig -ImportObject $ressource

The previous sample work to set a value but it didn't work to reset the field, I can't set a null value. I can manually reset this field via portal so I would guess that it is possible with a script.
Did any one succeed to clear a reference field (single-valued or multi-valued attribute) ?

Mar 20, 2014 at 8:59 PM
Good question. Oddly I hadn’t created a sample for that, but now there is one:

Let me know if it works for you!

Mar 31, 2014 at 8:54 AM

Hi Craig,

I tried to remove person’s manager from PowerShell script with the sample you sent me, but it still not working…

I don’t know which value I have to place to set it back to a null value. I tried with :


“”(empty string)

“ “ (just a space)

I don’t know which way I should follow to fix it.



Ce message a été classé Publique par Gregory Gondouin le lundi 31 mars 2014.
Les labels de classification ont été ajoutés par Titus Message Classification.

Gregory Gondouin

Tel : +33 4 76 21 17 03
Email : [email removed]
30 cours de la libération 38100 Grenoble France

Contactez-nous directement en WebChat

Signature créée avec Signature Manager

De : CraigMartin [email removed]
Envoyé : jeudi 20 mars 2014 21:00
À : Gregory Gondouin
Objet : Re: Clearing a reference field [fimpowershellWF:539565]

From: CraigMartin

Good question. Oddly I hadn’t created a sample for that, but now there is one:

Let me know if it works for you!


MailScanner CronLabAntiSpamAppliance Signature

CronLab scanned this message. We don't think it was spam. Was it? Report here!

Mar 31, 2014 at 5:58 PM
Apr 1, 2014 at 9:39 AM
Hi Craig,

Thank you for your reply.
I tried your sample above but I get the following error :
New-FimImportChange : Cannot process command because of one or more missing mand
atory parameters: AttributeValue.
At <ScriptFile.ps1..........>
                 New-FimImportChange <<<<  -AttributeName Manager -Operation Replace
     CategoryInfo          : InvalidArgument: (:) [New-FimImportChange], ParameterBindingException
     FullyQualifiedErrorId : MissingMandatoryParameter,New-FimImportChange
Here is what I tried :
New-FimImportObject -ObjectType Person -State Put -AnchorPairs @{AccountName='Bob'}  -Changes @( 
           New-FimImportChange -AttributeName Manager -Operation Replace
) -ApplyNow
May be I did something wrong...

When I try to do it via PowerShellcommand line, it prompts me to supply
Apr 1, 2014 at 9:41 AM
I have to supply a value for the parameter and if I let it empty it doesn't work