Wednesday, March 31, 2010

FIM 2010 – Registering FIMAutomation class on another system

So, you want to run FIM 2010 PowerShell cmdlets from another console? Here is what you need to do in order to register the FIMAutomation class.
  • Copy the FIM binaries to a local drive – if you attempt this from a mapped drive you will receive the following error:
Exception occurred while initializing the installation:
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.ResourceManagement.Automation, Version=4.0.2592.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417).
  • Open your PSH prompt and change to the directory holding the FIM binaries


set-alias installutil $env:windir\Microsoft.NET\Framework64\v2.0.50727\installutil 
installutil .\Microsoft.ResourceManagement.Automation.dll


set-alias installutil $env:windir\Microsoft.NET\Framework\v2.0.50727\installutil 
installutil .\Microsoft.ResourceManagement.Automation.dll


get-PSsnapin -registered

At this point you should be able to add the FIMAutomation snap-in and execute your scripts!


Post a Comment

Newer Post Older Post Home