Instalacja DLL do GAC w Windows Server 2012
Instalacja:
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
Kasowanie:
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
Źródło: http://social.technet.microsoft.com/wiki/contents/articles/22618.how-to-install-a-dll-to-the-gac-on-windows-server-2012-using-only-powershell.aspx