Skip to content

Add a filter to all Group criteria

Some FIM really REALLY annoys me, mostly when I come up against odd and unexpected limitations, but then I write a quick little PowerShell script to fix something or other and remember that this is really one of the best differentiators of the product. This quick fix came about because I realised that the group filters did not consistently use EmployeeStatus as a criterion, and with hundreds and hundreds of groups, there’s no way they could have been fixed manually.

. E:\scripts\FIMPowershell.ps1 #See

$filter = "/Group"
$objs = Export-FIMConfig -OnlyBaseResources -CustomConfig $filter

foreach ($obj in $objs)
    $grpfilter = ($obj.ResourceManagementObject.ResourceManagementAttributes | where {$_.AttributeName -eq "Filter"}).Value
    $DisplayName = ($obj.ResourceManagementObject.ResourceManagementAttributes | where {$_.AttributeName -eq "DisplayName"}).Value

    if ($grpfilter)
        if ($grpfilter.contains("EmployeeStatus = 'Active'")) 
        elseif ($grpfilter.contains("not(EmployeeStatus = 'Inactive')")) 
            "Change Inactive to Active"
            $grpfilter = $grpfilter.Replace("not(EmployeeStatus = 'Inactive')","EmployeeStatus = 'Active'")
            $ImportObject = ModifyImportObject -TargetIdentifier $obj.ResourceManagementObject.ObjectIdentifier -ObjectType "Group"
            SetSingleValue $ImportObject "Filter" $grpfilter
            $ImportObject | import-fimconfig
            "Add filter"
            $grpfilter = $grpfilter.Replace("]</Filter>"," and (EmployeeStatus = 'Active')]</Filter>")
            $ImportObject = ModifyImportObject -TargetIdentifier $obj.ResourceManagementObject.ObjectIdentifier -ObjectType "Group"
            SetSingleValue $ImportObject "Filter" $grpfilter
            $ImportObject | import-fimconfig


{ 2 } Comments

  1. Peter Stapf | October 4, 2013 at 11:13 am | Permalink

    Nice script as always Carol, i’ve done this also shortly, have to create a Set,MPR combinition for Team Admins, this where around 150 Sets/MPRs, no one wants to click this through the Portal.

    And by the way thanks for all the other posts which helped me a lot to get were I am now.

  2. Carol | October 4, 2013 at 10:19 pm | Permalink

    Thanks for your nice comment Peter. I’ve done lots of automated creation of Sets and MPRs, and even Workflows (using XOML templates). You can even combine with the PowerShell activity to trigger these actions from changes in the Portal – works well!

Post a Comment

Your email is never published nor shared. Required fields are marked *

Spam comments will be blocked by Akismet


misoprostol online pharmacy

cytotec order on line

cytotec without prescriptions in usa

no prescription generic cytotec

indian cytotec

cytotec purchase overnight delivery

generic cytotec without prescription

no prescription cytotec

cytotec sale no prescription

where to purchase cytotec oral cheap

cytotec order on line

200 mg cytotec

buy cytotec online with no perscription

where can i buy cytotec without a prescription

order cytotec overnight

buy cytotec without a percsription

buy misoprostol australia

100 mg cytotec

cytotec no rx

cytotec online purchase

cytotec for sale

cytotec generic

cytotec oral tablet no prescription discount

how to get cytotec

cytotec online cheap

buy misoprostol cheap without perscription

buying cytotec online

buy cytotec 200mg

order cytotec online consultation

cytotec oral tablet no prescription discount

cheap prices on cytotec

non prescription cytotec

how to by cytotec online

online pharmacy no prescription cytotec

do you need a prescription for cytotec in mexico

how to get cytotec online no prescription in 100 days

Where can i buy some cytotec online only using cash or money orders

cytotec no prescription needed 200mg

overnight shipping on generic cytotec

buy cytotec online no prescription

cytotec precio

order cytotec without rx

buy cytotec next day delivery

order cytotec no prescription

generic cytotec no prescription

cytotec generic

generic cytotec online no prescription

cytotec order

real cytotec without prescription

cytotec buy online

order cytotec online overnight shipping

cytotec buy online no prescription

cytotec online order

canada cytotec

order generic cytotec online no prescription

online pharmacy cytotec