This project has moved. For the latest updates, please go here.
1
Vote

version error?

description

(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?

Thanks.

comments

ryannewington wrote Jan 11, 2016 at 8:16 PM

Hi,

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).

Ryan

CASComp wrote Jan 12, 2016 at 4:04 PM

Hi.

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 8:33 PM

Hi,

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
http://blog.goverco.com/2012/04/use-powershell-to-put-your-assemblies.html

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

Ryan

CASComp wrote Jan 13, 2016 at 2: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?

Thanks.

ryannewington wrote Jan 13, 2016 at 5:17 PM

Great!

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

http://lithnetrma.codeplex.com/wikipage?title=Set-ResourceManagementClient&referringTitle=Cmdlet%20Reference