Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add-type -ReferencedAssemblies System.EnterpriseServices -typedefinition @'
- using System;
- using System.Globalization;
- using System.EnterpriseServices.Internal;
- public class GacInstall
- {
- public static void Main(string[] arguments)
- {
- try
- {
- string assemblyPath = arguments[0];
- Publish publish = new Publish();
- publish.GacRemove(assemblyPath);
- publish.GacInstall(assemblyPath);
- Console.WriteLine("Done!");
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- }
- }
- '@
- [GacInstall]::Main($args)
Advertisement
Add Comment
Please, Sign In to add comment