Registering a DLL assembly in the GAC using Powershell

If you are managing Sharepoint or Active Directory Federation Services, you sometimes have to register DLLs in the GAC without your supplier providing you a nice MSI installer to do so.

Once solution would be use gacutil but it is now a .Net Framework Utility, and you may not want to copy it on your servers. To accomplish the same thing using Powershell solely, you may run these lines:

Don not forget that you can retrieve many properties of the assembly, such as the public token,  just by loading it:


Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.