Last active
August 5, 2022 08:57
-
-
Save Fred-Vatin/609db8266927f5db136ba1b32e4eecad to your computer and use it in GitHub Desktop.
Update shortcut links aka refresh tile icons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region begin VARIABLES | |
$path = $env:APPDATA | |
$path = "$path\Microsoft\Windows\Start Menu" | |
$modifyfiles = Get-ChildItem -Path $path -Filter *.lnk -File -Recurse | |
#endregion VARIABLES | |
#region begin MAIN | |
foreach ($file in $modifyfiles) { $(Get-Item $file.Fullname).lastwritetime = $(Get-Date) } | |
Write-Host "`n" | |
Get-ChildItem -Path $path -Filter *.lnk -File -Recurse | Select-Object Name, LastWriteTime | Format-Table | |
#endregion MAIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment