Resources for IT Professionals >
Forums Home
>
Identity Management Forums
>
Identity Lifecycle Manager 2
>
FIM Scriptbox
FIM Scriptbox
Welcome to the FIM ScriptBox!
Scripts are a convenient way to simplify common tasks.
I'm sure that many of you have developed some cool scripts that will help others in the community to get a job done much faster.The objective of this post is to track, share and discuss information about scripts you have developed.
Please don't hesitate to contact us if you have a script you would like to share!FIM ScriptBox Content
Tools:
Date Type Title Version Author 10/28/2009 Tool C# helper classes generators 1.0 Paolo Tedesco 10/2/2009 Documenter FIM Provisioning Configuration Documenter 1.0 Markus Vilcinskas 10/1/2009 Tool FIM Object Visualizer 1.1 Markus Vilcinskas 8/3/2009 Viewer FIM CS Synchronization Rule Viewer Plus 1.6 Markus Vilcinskas 8/2/2009 Documenter FIM MA Attribute Flow Documenter 1.5 Markus Vilcinskas 8/1/2009 Viewer FIM Attribute Flow Precedence Viewer 1.5 Markus Vilcinskas 8/1/2009 Viewer FIM CS Synchronization Rule Viewer 1.5 Markus Vilcinskas PowerShell:
Date Title Author 11/18/2009 Using PowerShell to start Run Profiles Fabien Duchene 11/6/2009 Using PowerShell to list the configured management agents Markus Vilcinskas 11/6/2009 Using PowerShell to list the configured management agents Markus Vilcinskas 11/6/2009 Using VBScript to run a PowerShell script Markus Vilcinskas 11/6/2009 Using PowerShell to check your MPR configuration for synchronization Markus Vilcinskas 11/5/2009 Using PowerShell to display the value of the ERL attribute of a user Markus Vilcinskas 11/5/2009 Using PowerShell to display the value of the ERL attribute of a group Markus Vilcinskas 10/26/2009 Using PowerShell to manage multiple FIM scenarios on a lab computer Markus Vilcinskas 10/26/2009 Using PowerShell to test the FIM management agent account Markus Vilcinskas 8/1/2009 Using PowerShell to check the initial flow configuration of your AD MA Markus Vilcinskas 8/1/2009 Using PowerShell to determine the ERL configuration Markus Vilcinskas - Edited byMarkus VilcinskasMSFT, ModeratorSunday, August 02, 2009 11:10 PM
- Edited byMarkus VilcinskasMSFT, ModeratorMonday, August 03, 2009 3:07 AM
- Edited byMarkus VilcinskasMSFT, ModeratorTuesday, August 04, 2009 12:31 AM
- Edited byMarkus VilcinskasMSFT, ModeratorTuesday, August 04, 2009 12:32 AM
- Edited byMarkus VilcinskasMSFT, ModeratorTuesday, August 04, 2009 10:57 PM
- Edited byMarkus VilcinskasMSFT, ModeratorWednesday, August 05, 2009 1:59 PM
- Edited byMarkus VilcinskasMSFT, ModeratorWednesday, August 05, 2009 1:59 PM
- Edited byMarkus VilcinskasMSFT, ModeratorThursday, October 01, 2009 8:52 PM
- Edited byMarkus VilcinskasMSFT, ModeratorFriday, October 02, 2009 10:26 AM
- Edited byMarkus VilcinskasMSFT, ModeratorFriday, October 02, 2009 6:44 PM
- Edited byMarkus VilcinskasMSFT, ModeratorFriday, October 02, 2009 6:46 PM
- Edited byMarkus VilcinskasMSFT, ModeratorSunday, October 25, 2009 1:20 AM
- Edited byMarkus VilcinskasMSFT, ModeratorMonday, October 26, 2009 8:17 PM
- Edited byMarkus VilcinskasMSFT, ModeratorMonday, October 26, 2009 10:30 PM
- Edited byMarkus VilcinskasMSFT, ModeratorWednesday, October 28, 2009 5:11 PM
- Edited byMarkus VilcinskasMSFT, ModeratorFriday, November 20, 2009 10:02 PM
All Replies
- I have been working with MIIS/ILM/FIM since 2004.
While working on projects, managers/peers/other staff would come to me and ask questions such
1. What are the attributes imported/exported from this System?
2. Where is this attibute populated from?
3. Which system, this attirbute is exported to?
4. What is the business rule for this attribute?
5. What is precedence etc
To answer these questions to non technical staffs, I had developed an ASP.NET application.
The solution/architecture was like this.
1. Export the Server Configuration
2. Run C# program to conver it into into .CSV files
3. Run SSIS packages to import the data from .CSV file into SQL Database used by the ASP.NET Config Viewer application
Repeat steps 1 - 3 whenever Server Confugration changes
ASP.NET Config Viewer application would then present the information in the following format
--------------------------------------------------------------------------------------------
UI Looked something like this
--------------------------------------------------------------------------------------------
Management Agents/DS: <drop down list> Metaverse Objects: <drop down list> Complete Configuration
Use Case 1: User selects MA/DS from the list
-------------------------------------------------------------------------------------------------------
Management Agent/DS Name () Import Only attributes () Export Onll Attributes () Export and Import () All
Attr1 MA/DS Name : Attr Name
Attr2
. MVAttr1
. MVAttr2
.
.
Attr9
---------------------------------------------------------------------------------------------------------
() Import Only attributes -> Will display only those attributes that are imported from the DS into MV
() Expot Only attributes -> Will display only those attributes that are exported to DS
() Export and Import -> Above two
() All -> All the attributes
All the attribute names, MA/DS names, MV Objects names etc are displayed as hyperlinks and user call click on them to switch from one view to another any time.If the attribute mapping was advanced, Tooltip would provide details of the business rule (this was stored into the database. NOT C# code from the extension). Similar kind of UI for MV Object lever view.
Complete configuration displays the entire configuration similar to the Excel Spreadsheet view.
Again user can click on any attribute and move from one view to another.
MA Name MV Object Name MA Name
attr1 attr1 attr1
... ... ...
attr2 attr2 attr2
The tool also provided search functinality and present all the information in the form of tree structure.
Hopefully this should give an idea about the kind of tool which can be developed.
Unfortunately, I do not have any screen shots (and code) to show what I am talking about.
- Sachin - How to run the MAs in Parallel?
-----------------------------------
1. Create a folder structure
C:\Jobs\Logs
C:\Jobs\Check
C:\Jobs\NoCheck
C:\Jobs - Put all the scripts here
2. ILM_RunMA.vbs - VBScript to run the Management Agent
3. ILM_RunMA.bat -
---------------------------------------------------------------------------
@Echo OFF
echo "..." > c:\jobs\%4\%1.log
ping -n 2 127.0.0.1 >NUL
CScript //Nologo ILM_RunMA.vbs %1 %2 %NHSMail_DB_Server% %NHSMail_DB_Name%
del c:\jobs\%4\%1.log
IF %3 EQU "1" (
exit
)
-----------------------------------------------------------------------------
4. ILM_Wait.bat
-----------------------------------------------------------------------------
@Echo OFF
ping -n 5 127.0.0.1 >NUL
:Check
SET GO=1
FOR %%M IN ("%dir c:\jobs\%1\*.*%") DO (
ping -n 10 127.0.0.1 >NUL
SET GO=0
)
IF %GO% EQU 0 GOTO Check
--------------------------------------------------------------------------------
5. ILM_SetEnv.bat - Set all the env variables here
--------------------------------------------------------------------------------
@Echo OFF
IF NOT EXIST Check MKDIR Check
IF NOT EXIST Logs MKDIR Logs
del /Q c:\jobs\Check\*.*
-------------------------------------------------------------------------------------
6. ILM_Your_Jobs_1.bat - Runs the MAs
-------------------------------------------------------------------------------------
-- Ex. Run MAs sequentially
call ILM_RunMA.bat "MA_Nam1" "Run Profile Name" "0" NoCheck
call ILM_RunMA.bat "MA_Nam1" "Run Profile Name" "0" NoCheck
call ILM_RunMA.bat "MA_Nam1" "Run Profile Name" "0" NoCheck
-- Ex. Run MAs in Parallel. No the last two parameters while calling the batch file
call ILM_RunMA.bat "MA_Nam1" "Run Profile Name" "1" Check
call ILM_RunMA.bat "MA_Nam1" "Run Profile Name" "1" Check
call ILM_RunMA.bat "MA_Nam1" "Run Profile Name" "1" Check
call ILM_Wait.bat -> Wait until all the MAs have finished running
call ILM_RunMA.bat "MA_Nam1" "Run Profile Name" "0" NoCheck
call ILM_RunMA.bat "MA_Nam1" "Run Profile Name" "0" NoCheck
call ILM_RunMA.bat "MA_Nam1" "Run Profile Name" "0" NoCheck
-------------------------------------------------------------------------------------------
7. ILM_Your_Jobs.bat - Create a Windows Task to run this. This also creates a Continue.txt file which will make sure that jobs keep running in loop.
If you want to stop the schedule, delete Continue.txt file.
-------------------------------------------------------------------------------------------
@Echo Off
call ILM_SetEnv.bat
echo "..." > c:\jobs\Continue.txt
:BEGIN
CD C:\Jobs\
cls
SET LogFileName=%DATE%_%TIME%
SET LogFileName=%LogFileName:/=_%
SET LogFileName=%LogFileName::=_%
SET LogFileName=%LogFileName: =_%
SET LogFileName=%LogFileName:~0,-3%
CALL ILM_Your_Jobs_1.bat > C:\Jobs\Logs\ILM_Your_Jobs_%LogFileName%.log 2>&1
ping -n 30 127.0.0.1 >NUL
IF EXIST Continue.txt (
GOTO BEGIN
)
---------------------------------------------------------------------------------------------------------------------------------
We have been using this solution in PRODUCTION for a while now and it is very flexible.
- Sachin

