Hi @Eaven Huang ,
I have down some tests on your question. Please modify your $SourceFilePath and $ShortcutPath. The following screenshot for your reference:
$SourceFilePath
C:\Program Files\Google\Chrome\Application\chrome.exe(on client)
$ShortcutPath
C:\Users\Default\Desktop\Google Chrome.lnk(on client)
Test result:
Script:
> $SourceFilePath = " C:\Program Files\Google\Chrome\Application\chrome.exe"
> $ShortcutPath = " C:\Users\Default\Desktop\Google Chrome.lnk"
> $WScriptObj = New-Object -ComObject ("WScript.Shell")
> $shortcut = $WscriptObj.CreateShortcut($ShortcutPath)
> $shortcut.TargetPath = $SourceFilePath
> $shortcut.WindowStyle = 1
> $shortcut.Save()
For more detail about script, please refer to this link:
https://shellgeek.com/create-shortcuts-on-user-desktop-using-powershell/
Looking forward to your feedback.
Best regards,
Cherry
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.