Skip to content

Instantly share code, notes, and snippets.

@LuisEGR
LuisEGR / install_rsync.ps1
Created May 6, 2024 06:10
Install rsync in Windows 11, easy
# Download and install Git for Windows if not already installed
if (-not (Test-Path "C:\Program Files\Git\bin\git.exe")) {
Write-Host "Git for Windows not found. Downloading installer..."
Invoke-WebRequest -Uri "https://github.com/git-for-windows/git/releases/download/v2.31.1.windows.1/Git-2.31.1-64-bit.exe" -OutFile "git-installer.exe"
Write-Host "Installing Git for Windows..."
Start-Process -FilePath ".\git-installer.exe" -ArgumentList "/VERYSILENT" -Wait
Remove-Item ".\git-installer.exe"
}
# Create a temporary directory for downloads