mirror of
https://github.com/mgeeky/Penetration-Testing-Tools.git
synced 2024-11-29 13:56:54 +01:00
24 lines
496 B
PowerShell
24 lines
496 B
PowerShell
|
param (
|
||
|
[Parameter(Mandatory=$true)]
|
||
|
[string]
|
||
|
$TargetPath,
|
||
|
|
||
|
[Parameter(Mandatory=$true)]
|
||
|
[string]
|
||
|
$OutputLnk,
|
||
|
|
||
|
[Parameter(Mandatory=$false)]
|
||
|
[string]
|
||
|
$Arguments = "",
|
||
|
|
||
|
[Parameter(Mandatory=$false)]
|
||
|
[string]
|
||
|
$WorkingDirectory = ""
|
||
|
)
|
||
|
|
||
|
$WshShell = New-Object -comObject WScript.Shell
|
||
|
$Shortcut = $WshShell.CreateShortcut($OutputLnk)
|
||
|
$Shortcut.TargetPath = $TargetPath
|
||
|
$Shortcut.Arguments = $Arguments
|
||
|
$Shortcut.WorkingDirectory = $WorkingDirectory
|
||
|
$Shortcut.Save()
|