Skip to content

Instantly share code, notes, and snippets.

@jdhitsolutions
jdhitsolutions / PSRefresh.ps1
Last active November 25, 2025 03:43
Refresh a new Windows PowerShell Installation.
#requires -version 5.1
#requires -RunAsAdministrator
#PSRefresh.ps1
<#
Update key PowerShell components on a new Windows 10/11 installation.
This script is not intended for server operating systems. The script
should be run in an interactive console session and not in a remoting session.
@ajgringo619
ajgringo619 / configuration.nix
Last active September 19, 2025 11:20
My NixOS config using Hyper-V
# NOTE: this config contains a fair amount of user-specific settings, but I
# left them in as they provide working examples (Samba, systemd services, etc.).
#
# This config is designed for the Budgie Desktop, but can easily be adapted to
# any DE. For Hyper-V to work, blacklisting the hyperv_fb module was critical.
#
# I am also using GRUB instead of the default systemd-boot.
{ config, pkgs, ... }:
@Master-Guy
Master-Guy / MergeJson.ps1
Created November 6, 2021 13:32
Merge two JSON files
# Function to merge two JSON files, where the 2nd will override any settings in the 1st with the same name.
# Original by https://github.com/Master-Guy (Discord: Master-Guy#0001)
function JsonMerge {
param(
[Parameter(Mandatory)]
[PSCustomObject] $Json1,
[Parameter(Mandatory)]
[PSCustomObject] $Json2,
[parameter(DontShow)]
[int] $Nesting = 0,
@tahir-hassan
tahir-hassan / GetCircleFromPoints.ps1
Created July 18, 2021 17:01
PowerShell code to get a circle from three points on an arc.
class Point {
[double]$X;
[double]$Y;
Point([double]$x, [double]$y) {
$this.X = $x;
$this.Y = $y;
}
[Point]Add([double]$xDelta, [double]$yDelta) {
@Zackptg5
Zackptg5 / Manjaro_HyperV_Setup.md
Last active April 1, 2025 17:33
Manjaro HyperV Install Guide

Deprecated - Microsoft quit updating vm tools in favor of WSL2, it's only a matter of time before this breaks untirely (if it isn't already).

Credits, the original guide which has strangely vanished but can still be found via wayback machine here

This is largely the same as the original but with some updates

  • Setup a new machine in HyperV Manager. Make sure you choose 'Generation 2' and assign default switch for networking (or whatever other adapter you use). Then go to the new VM's settings, disable secure boot, and attach the manjaro iso to it (at the time of writing this, gnome doesn't work).
  • Boot up the vm, you'll be meeting with a black screen or the cli will show it stopped around display starting or whatever. Drop into terminal with CTL + ALT+ F2.
  • Login and type: pacman -Sy && pacman -S xf86-video-fbdev
  • Then restart the display manager: `systemctl r
@MVKozlov
MVKozlov / Show-MessageBox.ps1
Last active June 1, 2023 14:15
Powershell: Show GUI Messagebox and wait for user input or timeout
<#
.SYNOPSIS
Show GUI Messagebox
.DESCRIPTION
Show GUI Messagebox and wait for user input or timeout
.PARAMETER Message
Message to show
.PARAMETER Title
Messagebox title
.PARAMETER Buttons
@SMSAgentSoftware
SMSAgentSoftware / Delete-DeviceRecords.ps1
Last active November 12, 2025 15:44
Deletes device records in AD / AAD / Intune / Autopilot / ConfigMgr. Useful for Autopilot test deployments.
[CmdletBinding(DefaultParameterSetName='All')]
Param
(
[Parameter(ParameterSetName='All',Mandatory=$true,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$true)]
[Parameter(ParameterSetName='Individual',Mandatory=$true,ValueFromPipelineByPropertyName=$true,ValueFromPipeline=$true)]
[string[]]$ComputerName,
[Parameter(ParameterSetName='All')]
[switch]$All = $True,
[Parameter(ParameterSetName='Individual')]
[switch]$AD,
@Fuwn
Fuwn / README.md
Last active March 14, 2026 16:47
Windows XP All Editions Universal Product Keys Collection

Windows XP Logo

Although Microsoft no longer supports Windows XP updates, I'm sure many users still use it due to personal habits or job demands. Therefore, XP's product keys may still be necessary. Here lies the most comprehensive list of Windows XP product keys.

The following CD keys are official and original from Microsoft, primarily used for Windows XP Professional Service Pack 2/3 VOL/VLK system images, which are among the easiest to find on the Internet.

Windows XP Setup

Windows XP Professional 32-bit Edition

@infamousjoeg
infamousjoeg / CYBRAutomation.md
Last active September 26, 2025 13:59
CyberArk Automation - Greatest Hits!
@SteveL-MSFT
SteveL-MSFT / profile.ps1
Last active January 30, 2026 15:57
PowerShell Prompt
#Requires -Version 7
# Version 1.2.13
# check if newer version
$gistUrl = "https://api.github.com/gists/a208d2bd924691bae7ec7904cab0bd8e"
$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version')
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)"
if ([System.IO.File]::Exists($latestVersionFile)) {