Skip to content

Instantly share code, notes, and snippets.

View lazywinadmin's full-sized avatar

François-Xavier Cat lazywinadmin

View GitHub Profile
@gwblok
gwblok / Windows10BuildWebData.ps1
Created December 26, 2019 19:16
Pulls Windows 10 Release Information from Microsoft Website - Scrap HTML
<#
@gwblok (GARYTOWN.COM) 2019.12.26
Used to Grab Windows 10 Release Info and pull into PowerShell
Pulling Tables in was stolen from: https://www.leeholmes.com/blog/2015/01/05/extracting-tables-from-powershells-invoke-webrequest/
#>
$URL = "https://winreleaseinfoprod.blob.core.windows.net/winreleaseinfoprod/en-US.html"
[Microsoft.PowerShell.Commands.HtmlWebResponseObject]$WinReleaseWeb = Invoke-WebRequest -Uri $URL
param(
[string]$tenantId = "",
[string]$subscriptionId = "",
[string]$resourceGroupName = "",
[string]$apimServiceName = "",
[string]$clientId = "",
[string]$clientSecret = "",
[string]$apiName = "",
[string]$backendUrl = "",
[bool] $apiContainsMultipleVersions = $true
@jakobii
jakobii / HTTPServer.ps1
Last active May 4, 2024 14:02
A Basic Powershell Webserver
# You Should be able to Copy and Paste this into a powershell terminal and it should just work.
# To end the loop you have to kill the powershell terminal. ctrl-c wont work :/
# Http Server
$http = [System.Net.HttpListener]::new()
# Hostname and port to listen on
$http.Prefixes.Add("http://localhost:8080/")
@dfinke
dfinke / GetStockQuoteInExcel
Last active October 17, 2017 22:08
PowerShell Azure function, demos HTTP and Queue trigger. Pulls stock data from Yahoo, creates and emails an Excel doc to the target email
# Uses PowerShell in an Azure function to create an Excel file without Excel being installed
# Add your email
# paste in a browser
# wait for the email to show up
https://getstockquoteinexcel.azurewebsites.net/api/RequestExcelStockInfo?symbol=msft,xom,ge,ibm,jpm,fb&email="<<your email address>>"
@josby
josby / concat_mp4.sh
Created May 12, 2017 18:38
Concat GoPro Videos with ffmpeg
ffmpeg -f concat -safe 0 -i <(for f in ./*.MP4; do echo "file '$PWD/$f'"; done) -c copy output.MP4
@mubix
mubix / infosec_newbie.md
Last active July 4, 2024 21:11
How to start in Infosec
@dotps1
dotps1 / WinPENanoDomainJoin.ps1
Last active January 9, 2019 20:57 — forked from Ryan2065/WinPENanoDomainJoin.ps1
Nano domain join for use in SCCM task sequence!
$source = @'
using System;
using System.Security.Principal;
using System.Runtime.InteropServices;
namespace ECGCAT
{
public class Kernel32
{
[DllImport("Kernel32.dll", SetLastError = true)]

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@Ryan2065
Ryan2065 / WinPENanoDomainJoin.ps1
Created October 15, 2016 13:54
Nano domain join for use in SCCM task sequence!
$source = @'
using System;
using System.Security.Principal;
using System.Runtime.InteropServices;
namespace ECGCAT
{
public class Kernel32
{
[DllImport("Kernel32.dll", SetLastError = true)]
@iainbrighton
iainbrighton / Lability_Gen1_Media.ps1
Created August 4, 2016 07:54
Register Lability Gen1 media
## Register existing Windows 7 x64 Enterprise Evaluation VHD(X) media
$WIN7_x64_Enterprise_EN_Eval = @{
Id = 'WIN7_x64_Enterprise_EN_Eval';
Filename = 'WIN7_x64_Enterprise_EN_Eval_022016.vhdx';
Description = 'Windows 7 Enterprise 64bit English Evaluation Patched 02/16';
Architecture = 'x64';
MediaType = 'VHD';
Uri = '\\10.100.50.1\Public\ParentDisks\Win7_x64_Enterprise_EN_Eval_022016.vhdx';
CustomData = @{
PartitionStyle = 'MBR'; ## This creates a Gen1 VM