Deploy dll to GAC using Powershell

Deploy dll to GAC using Powershell
4 votes, 5.00 avg. rating (97% score)

Deploy dll to GAC

Following snippet will help to add dll to GAC using powershell.

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")            
$publish = New-Object System.EnterpriseServices.Internal.Publish            

The above snippet will add TestApp.dll to GAC. To remove dll from GAC, use $publish.GacRemove

Enterprise Services Class

February 9, 2016 В· Adi В· No Comments
Posted in: Asp.Net, Powershell, Sharepoint 2010, SharePoint 2013, SharePoint 2016, Tips and Tricks

Leave a Reply

What is 2 + 3 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)