Created
January 5, 2012 21:36
-
-
Save MikeLarned/1567454 to your computer and use it in GitHub Desktop.
Powershell GacUtil - Updating GAC Assemblies with PS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$gacUtil = "${Env:ProgramFiles(x86)}\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\gacutil.exe"; | |
function Add-GacItem([string]$path) { | |
#Full Path Name or Relative - ex: C:\Temp\Larned.dll | |
& $gacutil "/nologo" "/i" "$path" | |
} | |
function Remove-GacItem([string]$name) { | |
#Assembly Name - ex: if Dll was Larned.dll then Larned | |
& $gacutil "/nologo" "/u" "$name" | |
} | |
function Search-GacItem([string]$name) { | |
#Assembly Name - ex: if Dll was Larned.dll then Larned | |
& $gacutil "/nologo" "/l" "$name" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment