PowerShell to install uninstall dll from GAC

Most of the we need to install and uninstall dll from GAC,so here is the simple set of script to simplify this task.

#replace it with your dll path 
$dllPath ="C:\temp\FileName.dll" 
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")            
$publish = New-Object System.EnterpriseServices.Internal.Publish      

#to unistall dll from GAC
$publish.GacRemove($dllPath)
iisreset

#to install dll from GAC
$publish.GacInstall($dllPath)
iisreset

Download Source code