Win11 command script to copy software center shortcut to Default desktop folder

Eaven Huang 1,731 Reputation points

Dear exports,

Is there a working script that helps to copy the software center shortcut to Default desktop folder, so that new login users will use it later on?
My idea was to create an application in SCCM to run this script, so after client push is completed, the application will run to copy the shortcut to the default desktop location.

Thank you very much.

Microsoft Configuration Manager
Microsoft Configuration Manager Application
Microsoft Configuration Manager Application
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Application: A computer program designed to carry out a specific task other than one relating to the operation of the computer itself, typically to be used by end users.
336 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
3,582 questions
No comments
{count} votes

Accepted answer
  1. CherryZhang-MSFT 3,976 Reputation points Microsoft Vendor

    Hi @Eaven Huang ,

    I have down some tests on your question. Please modify your $SourceFilePath and $ShortcutPath. The following screenshot for your reference:

    C:\Program Files\Google\Chrome\Application\chrome.exe(on client)

    C:\Users\Default\Desktop\Google Chrome.lnk(on client)

    Test result:


    > $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:

    Looking forward to your feedback.

    Best regards,

    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.

    No comments

1 additional answer

Sort by: Most helpful
  1. Garth 4,486 Reputation points

    What do you have now for a script? What isn't working with it?