< Back
Get-AssociatedIcon
Post
NAME Get-AssociatedIcon
SYNOPSIS
Gets the icon associated with a program or file.
SYNTAX
Get-AssociatedIcon [-Path] <String[]> [<CommonParameters>]
DESCRIPTION
Get-AssociatedIcon retrieves the icon that Windows associates with that program or file.
PARAMETERS
-Path <String[]>
The path to the file containing the image to retrieve.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
Get-AssociatedIcon accepts string objects of file paths to the Path parameter binding to the Path property.
OUTPUTS
System.Drawing.Icon
Get-AssociatedIcon outputs a System.Drawing.Icon object representing the icon.
-------------------------- EXAMPLE 1 --------------------------
PS C:>Get-AssociatedIcon -Path C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe
This command will retrieve the icon associated with the PowerShell program.
RELATED LINKS
SYNOPSIS
Gets the icon associated with a program or file.
SYNTAX
Get-AssociatedIcon [-Path] <String[]> [<CommonParameters>]
DESCRIPTION
Get-AssociatedIcon retrieves the icon that Windows associates with that program or file.
PARAMETERS
-Path <String[]>
The path to the file containing the image to retrieve.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
Get-AssociatedIcon accepts string objects of file paths to the Path parameter binding to the Path property.
OUTPUTS
System.Drawing.Icon
Get-AssociatedIcon outputs a System.Drawing.Icon object representing the icon.
-------------------------- EXAMPLE 1 --------------------------
PS C:>Get-AssociatedIcon -Path C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe
This command will retrieve the icon associated with the PowerShell program.
RELATED LINKS