Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (29 sloc) 941 Bytes
Get-Icon extracts the icon image from an exe file
and saves it as a .ico file in the same directory as
the .exe file.
Get-DiskInventory will run on every .exe file in the specified
directory by the folder PARAMETER then save a .ico file for
every .exe discovered.
The directory containing the .exe files.
Get-Icon -folder c:\exelocation -name
Function Get-Icon {
Param (
[Parameter(Mandatory=$True,HelpMessage="Enter the location of the .EXE file")]
[System.Reflection.Assembly]::LoadWithPartialName('System.Drawing') | Out-Null
md $folder -ea 0 | Out-Null
dir $folder *.exe -ea 0 -rec |
ForEach-Object {
$baseName = [System.IO.Path]::GetFileNameWithoutExtension($_.FullName)
Write-Progress "Extracting Icon" $basename