Installing dll into GAC with PowerShell

You may install a dll into the GAC (global assembly cache) by doing the following:

 [Reflection.Assembly]::LoadWithPartialName("System.EnterpriseServices") | Out-Null 
[System.EnterpriseServices.Internal.Publish] $publish = new-object System.EnterpriseServices.Internal.Publish
$publish.GacInstall(<<FullFilePathToTheDll>>)
 

This has to do very little with native PowerShell but rather with instantiating and using .NET libraries from PowerShell