Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Monday, April 11, 2016

Powershell Script to Install a DLL into GAC on Windows Server 2012/ Windows Server 2012 R2 OS when there is no Visual Studio Installed on Web Server



Set-location "DLL Source Path"           
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")           
$publish = New-Object System.EnterpriseServices.Internal.Publish           
$publish.GacInstall("DLL Source Path\FileName.dll")           
iisreset

Example for Source Paths:-
            C:\DLLS

1 comment: