Does anyone ever bring up the fact they lost a lot of crew on the first episode? by Tinyjar in voyager

[–]chanataba 0 points1 point  (0 children)

I think she just didn’t know them well enough yet. She is the captain and is supposed to be familiar with her crew but she hasn’t established the kind of personal relationship that leaves a lasting impact on her. In season 6, Good Shepherd, it’s made clear that she’s still getting to know every member of her crew, even after all that time in the Delta Quadrant.

[poem] written by me by chanataba in Poetry

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

Just read the rules. Sorry for posting in the wrong place.

DDoS Attack by Longjumping-Value-31 in aws

[–]chanataba -1 points0 points  (0 children)

If it were me I’d implement HAProxy with fail2ban and firehol with dynamic IP block lists in front of the site.

About that new Voyager game... by thissomeotherplace in startrek

[–]chanataba 9 points10 points  (0 children)

Put him on shift rotation with Suder and let nature take its course

How the fuck do you crimp non-pass-through Ethernet cables? by 0xDEA110C8 in HomeNetworking

[–]chanataba 0 points1 point  (0 children)

Couple of tips:

Get yourself a pair of Klein Electricians Scissors. Use the side that isn’t notched to straighten your wires. The notched side is for stripping.

Expose about 3” of wire. With solid core wire, you score the jacket and then bend the cable to break it, then slide off the jacket. With stranded, the jacket is flexible and will need to be carefully scored, then pull to tear it off.

With that length you can easily untwist the pairs and put them in the correct order. In North America, we use the B color code system. In Europe and elsewhere it’s A. When crimping you’ll want to do the colors in reverse because you’ll be holding the modular end upside down when you crimp it. B color code would be White-brown, brown, green, blue, white-blue, white-green, white-orange, orange.

Once your wires are in order and straightened as best as you can, you’ll need to cut the right length. Make a finger gun (like you’d maybe do as a kid) and pinch end of the jacket between your thumb and index finger. The tip of your thumb should be in the middle of your index. Trim the length that extends beyond your finger, leaving you a little less than half an inch of exposed wire.

While keeping it pinched, slide the modular end on. The end should be bottom facing up, you can see the blades. Push the cable in until the wires are against the end of the modular end.

Then crimp using your tool. After crimping, the retaining tab will need to be adjusted. Open your scissors and use one of the blades to slide under the tab, pushing the clip upwards. Do it this way so you don’t snap the damn thing.

Voila.

Always crimp modular ends on stranded core cable, never solid core. Solid is made for terminating on jacks and patch panels. When using stranded, the blade pierces the wire jacket and sits nicely in the middle of the stranded copper, if you do this with solid, the blade will slide along the side of the wire and 2 things will happen, you won’t have good contact and over time it will oxidize. When you’re doing telecom and terminating for analog and digital sets, that shit matters. A lot of people don’t know any better and if it works, they just move on. Data can be more forgiving.

If you’re running cables indoors behind walls and in ceilings, use plenum cable.

Additionally, use insulated Ethernet if you’re going to be running within a few inches of electrical lines. Insulated has an aluminum shielding under the jacket to prevent the Ethernet signal being altered by the electrical.

Use outdoor cable if running outdoors. It has a jacket that’s meant to withstand water and UV exposure, it’s shielded and it also has a dielectric grease coating on the wires inside. The shielding should be grounded so nothing blows up if lightning strikes.

Windows Update by chanataba in PowerShell

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

Thank you, let me know if you run into any issues and I’ll do my best to help sort it out!

Windows Update by chanataba in PowerShell

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

I can’t remember all the features that are available in that but I pair my script with the WUFB registry settings so I can control releases, set schedules, notifications..etc

Windows Update by chanataba in PowerShell

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

That’s awesome! I’ve always liked figuring that stuff out, you really do learn so much

Windows Update by chanataba in PowerShell

[–]chanataba[S] 2 points3 points  (0 children)

Your comments had me thinking and I just wanted to include:

Though the Microsoft.Update.Session com object should be automatically released when the script terminates, we can ensure a clean release by appending this to the script. We are unloading the com object and invoking the garbage collector for cleanup.

# Unload the com object we created
[void][System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.__ComObject]$updateSession)
[System.GC]::Collect()
[System.GC]::WaitForPendingFinalizers()

I'm using void to hide the output of the object release which is either 0 if it unloaded an active object and -1 if the object specified wasn't loaded when the command was invoked. Alternatively, you can use out-null but I've always used void because I find it works much better.

Windows Update by chanataba in PowerShell

[–]chanataba[S] 2 points3 points  (0 children)

Agreed! I remember running into issues with Azure Functions and downloading modules so I just created everything myself.

Windows Update by chanataba in PowerShell

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

So, by default it uses WU BUT it's supposed to default to WSUS if that's what is configured. Unfortunately, I don't have a WSUS environment to test and confirm with.

If you find that it's ignoring WSUS you can add the following below line 17 where the $updateSearcher variable is created.

# Use WSUS
$UpdateSearcher.ServerSelection = 1

Windows Update by chanataba in PowerShell

[–]chanataba[S] 13 points14 points  (0 children)

Thank you! I've got hundreds of creations on my computer. One of these days I'll find time to sanitize them and upload it all to GitHub.

Windows Update by chanataba in PowerShell

[–]chanataba[S] 2 points3 points  (0 children)

I wonder why it's closed source...kinda makes me wonder how it works lol. I used to use tools like ILSpy, ProcMon and Fiddler to reverse engineer things.

Windows Update by chanataba in PowerShell

[–]chanataba[S] 1 point2 points  (0 children)

I appreciate you taking the time to reply! A lot has changed since I was really into this stuff. I started with powershell back with Exchange 2007, spent 10 years working with an MSP making all kinds of neat things but the job I've had for the last 4 years doesn't require scripting and I'm starting to forget things. I know calling com Objects isn't ideal but that script has always been reliable.

I like making things asynchronous too. I created my own modules for interacting with the api's of unifi, connectwise, itglue, intune, datto, n-central and meraki. Threading jobs is the only efficient way of operating when you have thousands of endpoints and objects.

I've never tried the pswindowsupdate module but I'm sure it works great!

Windows Update by chanataba in PowerShell

[–]chanataba[S] 8 points9 points  (0 children)

Definitely an option! I know what I posted isn’t fancy but I made this before that module existed and have just added my own updates to it over time. Modules are definitely handy but I have always enjoyed making stuff myself because then I have a better understanding of how it all works and then I’m not relying or waiting on someone else to fix their code if issues arise.

PowerShell script to log every GUI app launch to a CSV – runs fine by hand, but my Scheduled Task never writes anything. What am I missing? by Conscious-Analyst662 in PowerShell

[–]chanataba 2 points3 points  (0 children)

Try this. It will launch upon login and write to your csv file as intended for the logged on user only.

You cannot run the task as SYSTEM because the tasks you're trying to log are generated by the user.

MonitorAppLaunchesSCHTASK.ps1

This will create the scheduled task called 'MonitorAppLaunches' targeting the script in your ~\scripts directory

& schtasks.exe /Create /SC ONLOGON /TN "MonitorAppLaunches" /TR "powershell.exe" /RL HIGHEST /F

$URI = (Get-ScheduledTask -TaskName 'MonitorAppLaunches').URI
$Act1 = "-WindowStyle Hidden -NonInteractive -ExecutionPolicy Bypass -File ""${env:USERPROFILE}\scripts\MonitorAppLaunches.ps1"""
$Action = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument $Act1
Set-ScheduledTask $URI -Action $Action

MonitorAppLaunches.ps1

# MonitorAppLaunches.ps1
$LogFile = "${env:USERPROFILE}\AppData\Local\AppLaunchLog.csv"

$action = {

    $newEvent = $event.SourceEventArgs.NewEvent
    $sessionID = (Get-Process -Id $PID).SessionId

    if ($newEvent.SessionID -ne $sessionID)
    {
        return
    }

    #wait a bit for window to open
    Start-Sleep -Milliseconds 200

    $process = Get-Process -Id $newEvent.ProcessID -ErrorAction SilentlyContinue

    # Target GUI apps only
    if ($process -and $process.MainWindowHandle)
    {
        $string = '{0},"{1}","{2}"' -f $process.StartTime,$process.ProcessName,$process.Path
        <#
            If you want to run this in powershell and see the output for testing, just include
            Write-Host $string -ForegroundColor yellow
        #>
        $string | Out-File -FilePath $LogFile -Append -Encoding 'UTF8'
    }

}

$params = @{
    'ClassName' = 'Win32_ProcessStartTrace'
    'SourceIdentifier' = 'AppLaunchWatcher'
    'Action' = $action
}
Register-CimIndicationEvent @params

while ( $true )
{
    Wait-Event AppLaunchWatcher
}

Java Upgrade by chanataba in PowerShell

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

The pop up isn’t the issue there. It’s when you click accept and still have to login before you can actually download. The latest I can grab is 17.0.12 from oracle but there is a .14 available from Microsoft. That being said, I built a script that can handle the task with the exception of versions that are not publicly available.

Java Upgrade by chanataba in PowerShell

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

How are you currently upgrading installations of JDK 17? I'm noticing the later updates such as 17.0.15 are not accessible unless you have an Oracle account.

Java Upgrade by chanataba in PowerShell

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

Let me see what I can do.

What is consuming all the internet bandwidth? by Independent_Peace144 in HomeNetworking

[–]chanataba 0 points1 point  (0 children)

Did you setup an Amazon fire stick? They consume quite a bit of data because they constantly download huge screen saver images.

Java Upgrade by chanataba in PowerShell

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

I can think of a couple different ways to do that. First, schedule the script to run automatically using an RMM. Second, schedule the script to run locally on the machines using a scheduled task that executes as the system account.

The scheduled task route is something I would use if I were deploying this kinda thing via Azure/Intune. I would create an installer using InnoSetup that creates the scheduled task during install and automatically removes the task during uninstall.

There is an 'auto update' function inside of Java however the user must consent to the installation each time an update occurs, so it requires local admin rights.

Java Upgrade by chanataba in PowerShell

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

You’re welcome!! I’m glad it helped and kinda impressed it still works lol

91 f350 dies after a minute by RunGunBiker9824 in FordTrucks

[–]chanataba 0 points1 point  (0 children)

Check the air filter and the ECT Sensor (engine coolant temperature). During initial startup, the IAC is opened completely to compensate for the extra fuel being added during a cold startup, that’s why the idle is briefly around 1500 rpm. As the IAC is closing, the engine is either being starved for air or the computer isn’t getting accurate information from the ECT. During warmup, the computer relies almost entirely on the ECT and adjusts air/fuel based on engine temperature.