Skip to content

Instantly share code, notes, and snippets.

View swadeshp's full-sized avatar

Swadesh Shanker Parasher swadeshp

View GitHub Profile
@swadeshp
swadeshp / pia.ps1
Last active November 3, 2023 04:42 — forked from taschmidt/pia.ps1
PIA set qBittorrent port forward
Write-Host "Starting..."
# get qBittorrent process
$qbittorrent = Get-Process qbittorrent -ErrorAction SilentlyContinue
# if qBit is running, close it and start timer
if ($qbittorrent) {
Stop-Process -Name "qbittorrent"
$x = 1*60 #3 minutes, change this depending on your computer
$length = $x / 100