Skip to content

Instantly share code, notes, and snippets.

@gabriel-vanca
Last active January 22, 2024 04:11
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