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
View GitHub Profile
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
@jwmoss
jwmoss / tautulli.ps1
Created October 29, 2022 18:48
tautulli
function Get-LibraryTable {
[CmdletBinding()]
param (
[String[]]
$LibraryName = "Movies"
)
$body = @{
cmd = "get_libraries_table"
}
---
# This file contains definitions for the worker pools related to Firefox CI.
#
# Each worker pool is named by its <provisionerId>/<workerType> pair, each with
# the following structure (matching that for taskcluster-worker-manager):
#
# - `description` -- description of this workerType
# - `owner` -- owner of this workerType
# - `email_on_error` -- if true, email the owner on provisioning errors
# - `provider_id` -- the worker-manager provider for this worker pool
@jwmoss
jwmoss / worker-images.yml
Created October 20, 2022 16:39
worker-images
---
# This file contains definitions of worker images, for reference from
# worker-pools.yml.
#
# Each section keyed by image name, with the contents divided by cloud
# provider and then by cloud-provider-specific details.
#
# Aliases can be defined by a simple string; this is useful for "current" images
# docker-worker-hvm* are the Ubuntu-14.04 based workers, built by