Get-Shortcut
SYNOPSISโ
Get information from a new .lnk or .url type shortcut
SYNTAXโ
Get-Shortcut [-Path] <String> [-ContinueOnError <Boolean>] [<CommonParameters>]
DESCRIPTIONโ
Get information from a new .lnk or .url type shortcut. Returns a hashtable.
EXAMPLESโ
EXAMPLE 1โ
Get-Shortcut -Path "$envProgramData\Microsoft\Windows\Start Menu\My Shortcut.lnk"
PARAMETERSโ
-Pathโ
Path to the shortcut to get information from
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ContinueOnErrorโ
Continue if an error is encountered. Default is: $true.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: True
Accept pipeline input: False
Accept wildcard characters: False
CommonParametersโ
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTSโ
Noneโ
You cannot pipe objects to this function.โ
OUTPUTSโ
System.Collections.Hashtable.โ
Returns a hashtable with the following keysโ
- TargetPathโ
- Argumentsโ
- Descriptionโ
- WorkingDirectoryโ
- WindowStyleโ
- Hotkeyโ
- IconLocationโ
- IconIndexโ
- RunAsAdminโ
NOTESโ
Url shortcuts only support TargetPath, IconLocation and IconIndex.