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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×