New-Shortcut icon not being embedded in shortcut

//New-Shortcut icon not being embedded in shortcut
New-Shortcut icon not being embedded in shortcut 2016-05-26T18:10:08+00:00

The Toolkit Forums Deployment Scripts New-Shortcut icon not being embedded in shortcut

  • Author
    Posts
  • Jacob
    Participant
    Post count: 7
    #1364 |

    Hey all.

    I’m trying to create a web shortcut with an icon, and this is what I’m using:

    New-Shortcut -Path “$env:ProgramData\Microsoft\Windows\Start Menu\WebShortcutName.url” -TargetPath “https://www.google.com/” -IconLocation “$dirFiles\favicon.ico” -WindowStyle Minimized

    I’ve got the .ico file directly in the Files directory. When the shortcut gets created in the Start Menu, though, it doesn’t have the same icon as before.. it has the default IE shortcut one. Do custom icons not work for web (.url) shortcuts?

You must be logged in to reply to this topic.