Friday, April 20, 2012

Use Powershell to put your assemblies in the GAC

To use your own custom build workflows for FIM 2010, you need to put the hosting assemblies in the Global Assembly Cache (GAC) in the server hosting the FIM Service.

Normally, you'd want to download the .NET Framework SDK and get a hold of the Global Assembly Cache Tool (Gacutil.exe) which you certainly can use for the job of putting a DLL in the GAC. However, often times the SDK is not installed on the FIM Server and you may not even want to install this on your FIM Server.

PowerShell to the rescue. Since Gacutil.exe probably use .NET functions to get the job done, why not use the same functions from PowerShell and save the huge download and install?

Just get this short script which you can use instead of Gacutil.exe to put one or more assemblies in the cache without needing the .NET Framework SDK.

To learn how to use the script, just read the embedded help which also contains examples. Type this command in a PowerShell prompt -

Get-Help .\Add-AssemblyToGlobalAssemblyCache.ps1 -Detailed

Happy scripting...

8 comments:

Jan said...

Great tool, thanks!

Søren Granfeldt said...

Thank you, Jan.

Lusil said...

Right) I'm actually much more comfortable working with DLL,

because I install them fast enough and all the errors relating to DLL files are well-known to me msvcr120.dll https://fix4dll.com/msvcr120_dll. As far as caching in Powershell is concerned, I have to learn more about it, sure I'm ready to consider the alternatives and thanks for sharing.

Nannie Co Pam said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from .Net Core Training in Chennai. or learn thru .Net Core Training in Chennai. Nowadays Dot Net has tons of job opportunities on various vertical industry.
or Es6 Training in Chennai. Nowadays JavaScript has tons of job opportunities on various vertical industry.

sasitamil said...

After reading this web site I am very satisfied simply because this site is providing comprehensive knowledge for you to audience.
Thank you to the perform as well as discuss anything incredibly important in my opinion. We loose time waiting for your next article writing in addition to I beg one to get back to pay a visit to our website in



Selenium training in bangalore
Selenium training in Chennai
Selenium training in Bangalore
Selenium training in Pune
Selenium Online training

jefrin adams said...

Great post to read
Best blue prism training in chennai

digitalsourabh said...

C Language coaching in Bhopal
Nodejs Training in Bhopal
Big Data Training in Bhopal
FullStack Training in Bhopal
AngularJs Training in Bhopal

Techxinx said...

Thanks for a nice share you have given to us with such an large collection of information.
Great work you have done by sharing them to all. for more info
simply superb.PGDCA class in bhopal
autocad in bhopal
3ds max classes in bhopal
CPCT Coaching in Bhopal
java coaching in bhopal
Autocad classes in bhopal
Catia coaching in bhopal