Wednesday, January 29, 2014

Finding FIM Attributes and Bindings that have RegEx Validation

I recently had to find all the validations being done by FIM for a given object type. 

Here’s the script snippets I ended up with (note: they depend on the FIMAutomation snap-in and the FIM PowerShell Module):

 

###

### Show Bindings with RegEx Validation

###

Export-FIMConfig -OnlyBaseResources -CustomConfig @"

/BindingDescription

[

    BoundObjectType= /ObjectTypeDescription

    [

        Name='Group'

    ]

]

 

"@ |

Convert-FimExportToPSObject |

Where-Object {$_.StringRegex} |

Format-Table -AutoSize DisplayName,StringRegex

 

###

### Show Attributes with RegEx Validation

###

Export-FIMConfig -OnlyBaseResources -CustomConfig @"

/BindingDescription

[

    BoundObjectType= /ObjectTypeDescription

    [

        Name='Group'

    ]

]

/BoundAttributeType

"@ |

Convert-FimExportToPSObject |

Where-Object {$_.StringRegex} |

Format-Table -AutoSize DisplayName,StringRegex

 

No comments: