tacticalrmm/scripts_wip/Win_Shortcut_Creator2.ps1

15 lines
288 B
PowerShell
Raw Normal View History

2021-05-18 17:05:46 +00:00
param (
[string] $name,
[string] $url
)
$url = $url
$name = $name
$Shell = New-Object -ComObject ("WScript.Shell")
$ShortCut = $Shell.CreateShortcut("$env:Public\Desktop\$name.url")
$ShortCut.TargetPath="$url"
$ShortCut.Save()
# arguements: -name {{shortcut name}} -url {{url}}