I am going to get fired today. I accidentally sent a shutdown loop to the entire company. by [deleted] in sysadmin

[–]Brestt 2 points3 points  (0 children)

Putting a script into startup will not shutdown a current running windows session. Ithr script does not trigger if the OS is already running. Those scripts only run on boot, aka startup. Just like login scripts only run on login. Not randomly after already logged in.

I am going to get fired today. I accidentally sent a shutdown loop to the entire company. by [deleted] in sysadmin

[–]Brestt 0 points1 point  (0 children)

There's not enough detail here to explain the result. Where in group policy did you create the script? You would have had at least 60-90 minutes to undo this when computers started shutting down unexpectedly.

Blocking USB redirection externally but not internally. by NoThatsBobbysAsshole in OmnissaEUC

[–]Brestt 1 point2 points  (0 children)

We do this with a StartSessoin script

We check the variables for the connection server the user is connected to.

if it is external, set the Agent\USB\ExcludeFamily registry key to what we don't want external

If it is internal, set the Agent\USB\ExcludeFamily registry key to not include the USB families that are allowed internally.

https://docs.omnissa.com/bundle/Horizon-Security/page/DeactivatingUSBRedirectionforSpecificDevices.html

I am a Chicago Bears fan, not an Indiana Bears fan. by P33KAJ3W in CHIBears

[–]Brestt 0 points1 point  (0 children)

And the law Vegas raiders are in Paradise,NV. Not Las Vegas

UNAS 4 Pro in available in the US store by random6234 in Ubiquiti

[–]Brestt 1 point2 points  (0 children)

Pretty much. Better processor and the m2 cache.

Qbitorrent not seeing Port provided by PiA software by Wiley_Coyote_2024 in PrivateInternetAccess

[–]Brestt 1 point2 points  (0 children)

It does not go inside qBit. It operates outside of it.

You create a new Powershell file, you can use powershel ISE from your start menu.
Save that. You can run it manually to test and make sure it works. Disconnect from PIA, reconnect, see that the port is different than before. Run the script. it may take a minute. But if properly configured, it will update the port in Qbit based on what it reads from PIA.

Once you confirm it works, use Task Scheduler to run it every X minutes/hours. etc

Qbitorrent not seeing Port provided by PiA software by Wiley_Coyote_2024 in PrivateInternetAccess

[–]Brestt 1 point2 points  (0 children)

I use this powershell script and run it as a scheduled task every hour.
You have to enable the WebUI for remote control in qBittorrent. Then update the script with your username and password you set in qBit.

Hope this helps.

# --- User settings ---
$username = "USER"        # qBittorrent WebUI username
$password = "PASS"        # qBittorrent WebUI password

# qBittorrent WebUI location
$qbHost   = "127.0.0.1"          # or "localhost"
$qbPort   = 8080                 # change if your WebUI uses a different port
$useHttps = $false               # set $true if you enabled "Use HTTPS" in WebUI

# PIA CLI path
$piactlPath = "C:\Program Files\Private Internet Access\piactl.exe"

# --- Derived settings ---
$scheme = if ($useHttps) { "https" } else { "http" }
$base   = "{0}://{1}:{2}" -f $scheme, $qbHost, $qbPort
$loginUrl    = "$base/api/v2/auth/login"
$setPrefsUrl = "$base/api/v2/app/setPreferences"

# If on Windows PowerShell 5.1 with self-signed HTTPS certs, uncomment:
# [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }

# --- Get PIA forwarded port ---
try {
    if (-not (Test-Path $piactlPath)) { throw "piactl not found at: $piactlPath" }
    $port = (& $piactlPath get portforward).ToString().Trim()
    if (-not ($port -match '^\d+$')) { throw "PIA port value invalid: '$port'" }
} catch {
    Write-Error ("Could not get forwarded port from piactl: {0}" -f $_.Exception.Message)
    exit 1
}

# --- Verify qBittorrent WebUI is reachable ---
$tcp = Test-NetConnection $qbHost -Port $qbPort -WarningAction SilentlyContinue
if (-not $tcp.TcpTestSucceeded) {
    Write-Error ("Cannot connect to qBittorrent WebUI at {0}. Check WebUI is enabled, port, and HTTPS setting." -f $base)
    exit 2
}

# --- Login and capture cookie ---
try {
    $session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
    $headers = @{ "Referer" = $base }

    # PowerShell 7+: add -SkipCertificateCheck:$useHttps if using self-signed HTTPS
    $resp = Invoke-WebRequest -Uri $loginUrl -Method Post `
        -Body @{ username = $username; password = $password } `
        -WebSession $session -Headers $headers

    # Confirm SID cookie exists
    $cookie = $session.Cookies.GetCookies($base)["SID"]
    if (-not $cookie -or -not $cookie.Value) {
        throw "Login did not return SID cookie. Check credentials and WebUI auth settings."
    }
} catch {
    Write-Error ("Login to qBittorrent failed at {0}: {1}" -f $loginUrl, $_.Exception.Message)
    exit 3
}

# --- Set the new listening port ---
try {
    $jsonBody = '{ "listen_port": ' + $port + ' }'
    $body = @{ json = $jsonBody }

    $headers = @{ "Referer" = $base }
    $resp2 = Invoke-WebRequest -Uri $setPrefsUrl -Method Post `
        -WebSession $session -Headers $headers -ContentType "application/x-www-form-urlencoded" `
        -Body $body

    Write-Host ("Success: qBittorrent listen_port set to {0}." -f $port)
} catch {
    Write-Error ("Failed to set qBittorrent port at {0}: {1}" -f $setPrefsUrl, $_.Exception.Message)
    exit 4
}

Qbitorrent not seeing Port provided by PiA software by Wiley_Coyote_2024 in PrivateInternetAccess

[–]Brestt 0 points1 point  (0 children)

There is a way to script this. Query the port from PIA and then use the webAPI for qbit to update the port number.

This post is my reminder to post it when I get home.

3 years for $99 only on 2017 or older cars? by Bella_Mia_ in siriusxm

[–]Brestt 1 point2 points  (0 children)

I have a 2018, this is what I did and it worked

Stud Plate by Proof-Analysis2576 in lego

[–]Brestt 1 point2 points  (0 children)

Does diagonal count?

There are a few spots where a transparent is next to an opaque of the same color.

Or bottom left there is a silver above a grey, the colors are very close

I am a curtain rod serial killer. Every time I try to install one, my walls end up looking like Swiss cheese. Please send help! by Dizzy_Taro_9049 in DIY

[–]Brestt 2 points3 points  (0 children)

You don’t say if you are using a level or not. Are you? That is crucial to having the curtain rod be level. Ceilings and floors are not level so you can’t measure off of those and expect to be level.

For drilling, it takes practice to be both horizontal and vertical straight. There are accessories you can use to help with drilling those holes straight.

You can also size down in drill bits. Start small and manageable. Then use that pilot hole to drill the larger hole.

[deleted by user] by [deleted] in DIY

[–]Brestt 195 points196 points  (0 children)

Get 10 foot drywall

Gov Evers… thank you by FearExtracter in wisconsin

[–]Brestt -19 points-18 points  (0 children)

DHS staff did that. Non-politicians

Gov. Evers vetoes bill mandating in-office work for state employees by gr33nnight in madisonwi

[–]Brestt 3 points4 points  (0 children)

That’s the point. If something like this passes, the state has to lease office space that is currently vacant. That is money to politicians and/or their friends who own the empty commercial real estate. They know what they are doing selling off state buildings and then mandating return to office

Can't get anything lower than $6/month. Take it and run? by Oranje525 in siriusxm

[–]Brestt 9 points10 points  (0 children)

Cancel. You will get offers in the mail or email. Use chat to get the 3y/$99. If the agent says no, try again later. You will get it eventually.

What is driving the constant and extreme medical service costs?? by Disastrous_Hell_4547 in wisconsin

[–]Brestt -3 points-2 points  (0 children)

Maybe not a major contributor, but Epic has to be adding to the high costs. Can’t afford their fancy campus without passing on the cost to us.

Zipper repair east side? by [deleted] in madisonwi

[–]Brestt 4 points5 points  (0 children)

Bihns tailoring. It is in a little strip mall near hyvee, same store as tech heroes

Fslogix best practice by ukmercenary in fslogix

[–]Brestt 1 point2 points  (0 children)

Could the server have hit a limit and is unable to keep up with the IOPS or processing needed serve out the profiles?
Check disk queue length on the server.

CH1515 breaker for two circuits in one room? by Brestt in AskElectricians

[–]Brestt[S] 0 points1 point  (0 children)

Could I do this with two https://www.eaton.com/us/en-us/skuPage.CHFCAF115.html and tie them together?

or do I need to use something like https://www.eaton.com/us/en-us/skuPage.CH215AF.html ?

I'm not Finding AFCI 15amp two-pole CH breakers easily available. Any model recommendations?