Skip to content

Instantly share code, notes, and snippets.

@ninmonkey
ninmonkey / A cheat sheet - VS Code, Wt, etc config file locations.md
Last active July 13, 2022 08:19
cheat sheet - VS Code, Wt, etc config files

Windows 10

App Note Path
VS Code Global config $Env:APPDATA\Code\User\Settings.json
VS Code - Insiders Global config $Env:APPDATA\Code - Insiders\User\Settings.json
VS Code Extensions Dir $env:UserProfile\.vscode\extensions
Wt Preview see Get-WindowsTerminalProfile.ps1 $env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState\settings.json
@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
@desbest
desbest / Reset-WindowsUpdate.ps1
Last active May 5, 2025 14:06
Reset Windows Update Client Settings Script
<#
.SYNOPSIS
Reset-WindowsUpdate.ps1 - Resets the Windows Update components
.DESCRIPTION
This script will reset all of the Windows Updates components to DEFAULT SETTINGS.
.OUTPUTS
Results are printed to the console. Future releases will support outputting to a log file.
@gwblok
gwblok / GetMachineDatabase-WithPrompts-FromCM.ps1
Last active April 16, 2021 07:47
Dynamically create Collections based on your Hardware Inventory in CM
<#V2020.01.27
Updated Script to Create "Operational" Folder and then move newly created Collections there.
Borrowed Code from Benoit Lecours
Made script pull addtional info dynamic, you shouldn't have to make any environmental chanages for script to work.
Script now also creates an "All Workstation" Collection and uses that as the limiting collection, unless one with that name already exist, then uses that.
Change the Limiting Collection info by updating: $LimitingCollection
You can easily modify the Collection Prefix now by changing these below:
$ModelColPrefix = "ModelCol"
$ManufacturerColPreFix = "ManufacturerCol"
@echo off
Title Converter Office 2016 Retail to Volume
echo Press Enter to start VL-Conversion...
echo.
pause
echo.
for /f "tokens=6 delims=[]. " %%G in ('ver') do set win=%%G
@potatoqualitee
potatoqualitee / Save-KBFile.ps1
Last active July 5, 2024 11:31
Download Windows patch files / KB (patchid like KBxxxxx) and save them to disk using PowerShell
function Save-KBFile {
<#
.SYNOPSIS
Downloads patches from Microsoft
.DESCRIPTION
Downloads patches from Microsoft
.PARAMETER Name
The KB name or number. For example, KB4057119 or 4057119.
@SMSAgentSoftware
SMSAgentSoftware / New-RemoteToastNotification.ps1
Created June 11, 2019 12:59
Displays a toast notification on a remote computer
$Sender = "Trevor Jones"
$Message = "Hey buddy - ready for lunch?"
$RemoteComputer = "PC001"
Function New-ToastNotification {
Param($Sender,$Message)
# Required parameters
$AudioSource = "ms-winsoundevent:Notification.Default"
$HeaderFormat = "ImageAndTitle" # Choose from "TitleOnly", "ImageOnly" or "ImageAndTitle"
@echo off
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
@rem *** Disable Some Service ***
sc stop DiagTrack
sc stop diagnosticshub.standardcollector.service
sc stop dmwappushservice
sc stop WMPNetworkSvc
sc stop WSearch
@alirobe
alirobe / reclaimWindows10.ps1
Last active June 10, 2025 00:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
### OR take a look at
### https://github.com/HotCakeX/Harden-Windows-Security
@lalibi
lalibi / Set-WindowState.ps1
Last active April 11, 2025 09:14 — forked from Nora-Ballard/Set-WindowState.ps1
Hide, Show, Minimize, Maximize, etc window from Powershell.
function Set-WindowState {
<#
.SYNOPSIS
Set the state of a window.
.DESCRIPTION
Set the state of a window using the `ShowWindowAsync` function from `user32.dll`.
.PARAMETER InputObject
The process object(s) to set the state of. Can be piped from `Get-Process`.