Jump to content
ZenTekDS

Desktop Shortcut

Recommended Posts

I've had this script I've used in our old RMM which would allow you to execute the script as the logged in user. I don't seem to have found a way to do this. Is there a way or what's the best way to create a shortcut on the current users desktop?

$Shell = New-Object -ComObject ("WScript.Shell")
$Favorite = $Shell.CreateShortcut($env:USERPROFILE + "\Desktop\MyShortcut.url")
$Favorite.TargetPath = "http://www.google.com";
$Favorite.Save()

Share this post


Link to post
Share on other sites

If all users need the same shortcut, I recommend putting it on the public user's desktop instead, which would give it to all users that log into the system. It might also be better suited for a GPO, which has very good per-user control.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...