Skip to content

Commit

Permalink
Create Get-GacAssemblyFile.md
Browse files Browse the repository at this point in the history
  • Loading branch information
LTruijens committed Sep 8, 2015
1 parent 0bd1aa7 commit 3ccecf1
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Get-GacAssemblyFile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Get-GacAssemblyFile

Gets the FileInfo of assemblies in the GAC. FileInfo can be used as input for Copy-Item to
extract an assembly from the GAC or to get the VersionInfo from the assembly.

## SYNTAX
```powershell
Get-GacAssemblyFile [-AssemblyName] <AssemblyName[]> [<CommonParameters>]
```

## PARAMETERS
```powershell
-AssemblyName <AssemblyName[]>
```
Specifies the assembly name. Must be fully qualified. See Test-AssemblyNameFullyQualified.
```powershell
<CommonParameters>
```
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable.

## EXAMPLES
```powershell
C:\PS>Get-GacAssembly -Name System -Version 4.0.0.0 | Get-GacAssemblyFile | Copy-Item -Destination C:\Temp
```
This example extracts the System assembly with version 4.0.0.0 from the GAC to the C:\Temp path.
```powershell
C:\PS>(Get-GacAssembly -Name System | Get-GacAssemblyFile).VersionInfo
ProductVersion FileVersion FileName
-------------- ----------- --------
2.0.50727.6401 2.0.50727.640... C:\Windows\assembly\GACMSIL\System\2.0.0.0_b77a5c561934e089\System.dll
4.0.30319.18033 4.0.30319.180... C:\Windows\Microsoft.Net\assembly\GACMSIL\System\v4.04.0.0.0b77a5c561934e089\
S...
```
This example returns the VersionInfo all System assemblies in the GAC.

0 comments on commit 3ccecf1

Please sign in to comment.