VincentVS
10/13/2015 - 9:04 AM

Install/Remove dll to/from Gac - Powershell

Install/Remove dll to/from Gac - Powershell

#Remove toGac

Set-location "c:\Folder Path"            

[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")            

$publish = New-Object System.EnterpriseServices.Internal.Publish            

$publish.GacRemove("c:\Folder Path\DLL.dll")            

iisreset
#Install toGac

Set-location "c:\Folder 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("c:\Folder Path\DLL.dll")            

iisreset