Create Win_Shortcut_Creator2.ps1

This commit is contained in:
agit8or 2021-05-18 13:05:46 -04:00 committed by GitHub
parent 870bf842cf
commit 623f35aec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
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}}