This project has moved and is read-only. For the latest updates, please go here.

version error?


(This is moved -- and restated -- from discussion to issue.)
Disclosure: I am not a FIM administrator nor a developer.

I would like to use this on my workstation to pull some information from FIM because the FIMAutomation Snap-in is so darn slow, but I'm getting an error:
> Set-ResourceManagementClient -BaseAddress "$FIMURL" -Credentials $scred
Set-ResourceManagementClient : An error occurred while loading attribute 'FaultContractAttribute' on method 'Get' in
type 'Resource'.  Please see InnerException for more details.
The InnerException states:
Could not load file or assembly 'Microsoft.ResourceManagement, Version=4.1.3451.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
I have tried both the 4.0.2592.0 and the 4.1.3559.0 versions of the ResourceManagement DLLs with the same error. Does this module only work with the specific, 4.1.3451.0 version or have I done something wrong?



ryannewington wrote Jan 11, 2016 at 9:16 PM


Sorry for the delayed response - I've been on leave. Were you able to get this resolved?

If not, have you registered the ResourceManagement DLL in the GAC?

4.0 definitely will not work, but 4.1.3451.0 or above will (including MIM).


CASComp wrote Jan 12, 2016 at 5:04 PM


I did not get it resolved, though I haven't spent much additional time on it either.

Embarrassingly, I don't know what "registering in the GAC" means. Thus far, I've been able to use the FIMAutomation plugin by including in my test scripts the following:
set-alias installutil $env:windir\Microsoft.NET\Framework64\v2.0.50727\installutil 
installutil .\Microsoft.ResourceManagement.Automation.dll
Add-PSSnapin FIMAutomation
If that is not registering in the GAC, then maybe doing so is too "developer-y" for me.

All I want to do is make some scripted queries to FIM without it taking absurd amounts of time (compared to how long it takes in the web interface). It's amazing to me that there doesn't seem to be other mid/lower-level admins looking to do the same.

Thanks for the response.

ryannewington wrote Jan 12, 2016 at 9:33 PM


The Global Assembly Cache (GAC) is how .NET finds DLLs. In this case, we need to register Microsoft.ResourceManagement.dll, as it wasn't registered normally as part of the FIM installation.

Here is a powershell script you can use to do that

Once that is done, you should be able to use the LithnetRMA module normally.


CASComp wrote Jan 13, 2016 at 3:43 PM

Hey, great!

It looks like I have that working. At least I get no errors with a set-resourceManagementClient.

I've run into another minor snag though. Your tools don't offer a -credential switch to allow connection under a different account. Any chance of adding that?


ryannewington wrote Jan 13, 2016 at 6:17 PM


The Set-ResourceManagementClient cmdlet takes a -Credentials parameter. These creds are then used for all further operations against the server