May 20, 2008 at 8:19 PM
Edited May 20, 2008 at 8:20 PM
Here's a PowerShell script that will put the EL4.0 (May 2008) DLL's into the GAC:
#Purpose: Put all the DLL's of the Microsoft Enterprise Library 4.0 May 2008 edition to the Global Assembly Cache
# one of the two next lines is required in order to run gacutil in a powershell script:
#Set-Alias -Name gacutil -Value $env:ProgramFiles'\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe'
# keep track of current directory location before we change
# change to where the EL4.0 DLL's are located
$env:ProgramFiles\'Microsoft Enterprise Library
4.0 - May 2008\Bin'
# place each one into the Global Assembly cache
gacutil /nologo /i $file.Name
# return to previous directory location