If you need to deploy DLL files to the GAC of a server, you can do it by executing the following PS code:
[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:TestTest.dll) iisreset
In case you need to remove the dll from the GAC, you can do it by executing the following:
[System.Reflection.Assembly]::Load(System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) $publish = New-Object System.EnterpriseServices.Internal.Publish $publish.GacRemove(Test.dll) iisreset
Hopet it helps!