Skip to content

Instantly share code, notes, and snippets.

View jwmoss's full-sized avatar
🤩
Stuck in a foreach loop

Jonathan Moss jwmoss

🤩
Stuck in a foreach loop
  • Wilmington, NC
View GitHub Profile
@jwmoss
jwmoss / parse_task.py
Created October 24, 2024 18:18
parse_task
# pip install mozci
# pip install zstandard
import requests
import sys
from mozci.util.taskcluster import get_task
#input_task_id = "OkI2h843RBGsyOzo5NH1Dg"
input_task_id = sys.argv[1]
@jwmoss
jwmoss / oobe_24h2.ps1
Created October 3, 2024 21:01
oobe_24h2
@(
"HideEULAPage",
"HideLocalAccountScreen",
"HideOEMRegistrationScreen",
"HideOnlineAccountScreens",
"HideWirelessSetupInOOBE",
"NetworkLocation",
"OEMAppId",
"ProtectYourPC",
"SkipMachineOOBE",
@jwmoss
jwmoss / afaddin.ps1
Last active August 9, 2024 19:18
afaddin
# Define the software to uninstall and the new software to install
$softwareToUninstall = "AdvanceFlow Addin"
$newSoftwareInstallerPath = "./ps1"
$newSoftwareInstallArguments = "/i /qn"
# Function to uninstall the old software
function Uninstall-Software {
param (
[string]$softwareName
)
Write-output "hi"
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls1
$code= @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) {
return true;
}
}
"@
iwr "https://downloadmirror.intel.com/739771/LAN-Win11-1.1.3.34.zip" -OutFile "C:\LAN-Win11-1.1.3.34.zip"
New-item -Path "C:\" -Name "NUCDrivers" -ItemType Directory -Force
Expand-Archive -Path "C:\LAN-Win11-1.1.3.34.zip" -DestinationPath "C:\NUCDrivers"
@jwmoss
jwmoss / adcheck.ps1
Last active June 19, 2023 15:47
adcheck
## Get all DCs
$ports = @(
"135", ## TCP
"389", ## TCP/UDP
"636", ## TCP
"3268", ## TCP
"3269", ## TCP
"53", ## TCP/UDP
"88", ## TCP/UDP
"445" ## TCP
@jwmoss
jwmoss / bootstrap.ps1
Last active June 8, 2023 15:48
bootstrap
## Check output of each one
Write-Host "Running gist from internet using write-host"
Write-Output "Running gist from internet using write-output"
Start-OSDCloud -ZTI
Restart-Computer -Force
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2020-02-26T08:37:38</Date>
<Author>SYSTEM</Author>
</RegistrationInfo>
<Triggers>
<BootTrigger>
<StartBoundary>2020-02-26T08:37:00</StartBoundary>
<Enabled>true</Enabled>
@jwmoss
jwmoss / uninstall.ps1
Last active January 12, 2023 19:02
citrix
$Keys = Get-ChildItem -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Class" -Recurse -ErrorAction SilentlyContinue | Where-Object {$_.GetValueNames() -contains 'UpperFilters'}
$Keys += Get-ChildItem -Path "HKLM:\SYSTEM\ControlSet001\Control\Class" -Recurse -ErrorAction SilentlyContinue |Where-Object {$_.GetValueNames() -contains 'UpperFilters'}
$Keys += Get-ChildItem -Path "HKLM:\SYSTEM\ControlSet002\Control\Class" -Recurse -ErrorAction SilentlyContinue | Where-Object {$_.GetValueNames() -contains 'UpperFilters'}
$xenfilt_keys = $Keys | Get-ItemProperty | Where-Object{$_.UpperFilters -like "XENFILT"}
$xenfilt_keys | ForEach-Object {Remove-ItemProperty -path $_.PSPath -Name "UpperFilters"}
reg add HKLM\SYSTEM\CurrentControlSet\Control\ /v ServicesPipeTimeout /t REG_DWORD /d 300000 /f
reg delete HKLM\SYSTEM\CurrentControlSet\Services\xenbus /f
reg delete HKLM\SYSTEM\ControlSet001\services\xenbus /f