Get assembly files from GAC using PowerShell

A while ago I found myself in an unfortunate situation where I had to use Reflector to figure out what I was doing wrong when interacting with third-party components. Unfortunately, a large part of the third-party code was in assemblies that were installed in the GAC, and I was unable to find them anywhere else.

Here’s a quick PowerShell one-liner that helped me out:

dir C:\Windows\Assembly -Recurse -Filter "VendorName*.dll" | foreach { copy $_.FullName C:\Temp\assemblies }

That was pretty quick and easy to come up with, and it makes me very glad I decided to learn the basics of PowerShell. 🙂

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *