FIM 2010 Set bit value based on a boolean

I am wondering how can I set an ad attribute bit value based on a boolean metaverse value.

So if I want to set LSB to 1 in ad, is this the correct way? I am a little bit confused with this.

IIF(BooleanAttribute,BitAnd(1,1),BitAnd(1,0))

September 8th, 2015 2:35am

Hello 2xTsei,

Please check Functions Reference for FIM 2010.

IIF() has to have a function inside, it's not like an "if" operator in PowerShell/any programming language - so there is a need of funtion, not only variable. So you have to do something like:

IIF(Eq(BooleanAttribute,"true"),BitAnd(1,1),BitAnd(1,0))

Free Windows Admin Tool Kit Click here and download it now
September 8th, 2015 2:46am

IIF(Eq(BooleanAttribute,"true"),BitOr(1,1),BitOr(1,0)) -> Attribute in AD

I am using a custom expression above. So what I want is set the Attribute in AD LSB to 1 when BooleanAttribute is true and set the the Attribute in AD LSB to 0 when BooleanAttribute is false.

So if Boolean Attribute is true and the Attribute in AD has LSB set to 0, I want change it to 1. For example 00000 -> 00001.

September 8th, 2015 5:18am

And actually it is like below when working with boolean attribute:

IIF(BooleanAttribute,,BitAnd(1,1),BitAnd

Free Windows Admin Tool Kit Click here and download it now
September 9th, 2015 6:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics