Skip to content

Instantly share code, notes, and snippets.

#
# WmiExplorer.ps1
#
# A GUI WMI explorer and WMI Method Help generator
#
# /\/\o\/\/ 2006
# www.ThePowerShellGuy.com
#
# load Forms NameSpace
[void][System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\powershell]
@="Open Powe&rShell here"
"Extended"=-
"Icon"="powershell.exe,0"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\powershell\command]
@="powershell.exe -noexit -command \"cd %V\""
@ThatAdminGuy
ThatAdminGuy / open-cmd-here-admin.bat
Created April 16, 2024 18:51 — forked from jordanbtucker/open-cmd-here-admin.bat
Add an "Open command window here (Admin)" context menu to folders
@echo off
net session > nul 2>&1
if /i not %errorlevel%==0 (
echo You must run this from an elevated prompt.
goto:eof
)
call :setreg "HKCR\Directory\shell\runas"
call :setreg "HKCR\Directory\Background\shell\runas"
@ThatAdminGuy
ThatAdminGuy / 10-run-this.ps1
Created January 6, 2024 13:53 — forked from mystix/10-run-this.ps1
Setup new Windows 10 machine
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/mystix/4813520f34737d77e2f266cb8af40503/raw/20-setup-windows.ps1'))
@ThatAdminGuy
ThatAdminGuy / PS-BGInfo.ps1
Created November 17, 2022 16:40 — forked from dieseltravis/PS-BGInfo.ps1
update wallpaper background image with powershell (like Sysinternals BGInfo)
# PS-BGInfo
# Powershell script that updates the background image with a random image from a folder and writes out system info text to it.
# run as a lower priority task
[System.Threading.Thread]::CurrentThread.Priority = 'BelowNormal'
# Configuration:
# Font Family name
$font="Input"
@ThatAdminGuy
ThatAdminGuy / WMI_event_discovery.ps1
Created October 10, 2021 02:21 — forked from mattifestation/WMI_event_discovery.ps1
Helper functions used to discover WMI intrinsic and extrinsic event classes
function Get-WmiNamespace {
<#
.SYNOPSIS
Returns a list of WMI namespaces present within the specified namespace.
.PARAMETER Namespace
Specifies the WMI repository namespace in which to list sub-namespaces. Get-WmiNamespace defaults to the ROOT namespace.
@ThatAdminGuy
ThatAdminGuy / WmiExplorer.ps1
Created October 10, 2021 02:12 — forked from mitchelldavis/WmiExplorer.ps1
A GUI WMI explorer and WMI Method Help generator www.ThePowerShellGuy.com
#
# WmiExplorer.ps1
#
# A GUI WMI explorer and WMI Method Help generator
#
# /\/\o\/\/ 2006
# www.ThePowerShellGuy.com
#
# load Forms NameSpace
[void][System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")