Skip to content

Instantly share code, notes, and snippets.

@gabriel-vanca
Last active July 19, 2024 03:07
Show Gist options
  • Save gabriel-vanca/c5fd8118a4c26ac9adcd617759c3f4da to your computer and use it in GitHub Desktop.
Save gabriel-vanca/c5fd8118a4c26ac9adcd617759c3f4da to your computer and use it in GitHub Desktop.
Run Github script with Parameters
$scriptPath = "https://raw.githubusercontent.com/gabriel-vanca/PowerShell_Library/main/Scripts/Windows/Software/close_program.ps1"
$WebClient = New-Object Net.WebClient
$close_program = $WebClient.DownloadString($scriptPath)
$close_program_sb = [Scriptblock]::Create($close_program)
$param1 = "Windows Terminal"
$param2 = "WindowsTerminal"
$param3 = "WindowsTerminal"
Invoke-Command -ScriptBlock $close_program_sb -ArgumentList ($param1, $param2, $param3) -NoNewScope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment