Skip to content

Instantly share code, notes, and snippets.

View Sh1n0g1's full-sized avatar

Sh1n0g1 Sh1n0g1

View GitHub Profile
@Sh1n0g1
Sh1n0g1 / Play-Mario.ps1
Created April 20, 2017 12:47 — forked from davewilson/Play-Mario.ps1
Super Mario Theme in PowerShell
Function Play-Mario {
[System.Console]::Beep(659, 125);
[System.Console]::Beep(659, 125);
[System.Threading.Thread]::Sleep(125);
[System.Console]::Beep(659, 125);
[System.Threading.Thread]::Sleep(167);
[System.Console]::Beep(523, 125);
[System.Console]::Beep(659, 125);
[System.Threading.Thread]::Sleep(125);
[System.Console]::Beep(784, 125);
@Sh1n0g1
Sh1n0g1 / Write-RegistryValue.ps1
Created March 23, 2017 03:00
Write Registry Value (and Create key if needed)
<#
.EXAMPLE
Write-RegistryValue -Path "HKCU:\Software\Sysinternals\Strings" -Name "EulaAccepted
#>
function Write-RegistryValue{
param (
[parameter(Mandatory=$true)][ValidateNotNullOrEmpty()]$Path,
[parameter(Mandatory=$true)][ValidateNotNullOrEmpty()]$Name,
[parameter(Mandatory=$true)][ValidateNotNullOrEmpty()]$Value