Extract icon from executable with PowerShell

PowerShell can be used to extract icons from executables. Here you’ll find a script that extracts the icons from all the executables in a given directory.
In this example the script is saved as Get-Icon.ps1.