Skip to content

Latest commit

 

History

History
37 lines (32 loc) · 1.3 KB

Get-GacAssemblyFile.md

File metadata and controls

37 lines (32 loc) · 1.3 KB

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

Get-GacAssemblyFile [-AssemblyName] <AssemblyName[]> [<CommonParameters>]

PARAMETERS

-AssemblyName <AssemblyName[]>

Specifies the assembly name. Must be fully qualified. See Test-AssemblyNameFullyQualified.

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer and OutVariable.

EXAMPLES

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.

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.