This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Host "Refreshing terminal" | |
.$PROFILE | |
# ($NULL -eq $IsWindows) checks for Windows Sandbox enviroment | |
if($IsWindows -or ($NULL -eq $IsWindows)) { | |
# Expected path of the choco.exe file. | |
$chocoInstallPath = "$Env:ProgramData/chocolatey/choco.exe" | |
if(Test-Path -path $chocoInstallPath) { | |
# Make `refreshenv` available right away, by defining the $env:ChocolateyInstall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$repoDownloadLocalPath = "$env:Temp\WinGet" | |
#Ensure download folder is empty | |
if(Test-Path -path $repoDownloadLocalPath) | |
{ | |
Remove-Item $repoDownloadLocalPath -Recurse -Force | |
} | |
$repoUrl = "https://github.com/gabriel-vanca/WinGet" | |
git clone $repoUrl $repoDownloadLocalPath --depth 1 --progress -v | |
Get-ChildItem $repoDownloadLocalPath -Recurse | Unblock-File |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 |