Skip to content

Instantly share code, notes, and snippets.

@IvanDrag0
IvanDrag0 / Add_OpenWithCode.bat
Created August 11, 2025 23:09
Add missing VS Code context menu entries (Windows)
@echo off
:: Batch script to add "Open with Code" to context menu (proper escaping)
:: Automatically elevates to Admin if needed
:: Source: https://github.com/Vanrou/FixMicrosoft/blob/main/Add_OpenWithCode.bat
:: Check for admin rights
fltmc >nul 2>&1 || (
echo Requesting administrator privileges...
powershell -Command "Start-Process -Verb RunAs -FilePath '%~0'"
@IvanDrag0
IvanDrag0 / DscWithWinRmDisabled.ps1
Created December 26, 2024 20:19 — forked from martin77s/DscWithWinRmDisabled.ps1
Using DSC with the WinRM service disabled
#region ### BUILD THE CONFIGURATION ###
# Declare the configuration:
Configuration TestDscWithoutWinRm {
Import-DscResource –ModuleName PSDesiredStateConfiguration
node localhost {
File akada {
Ensure = 'Present'
Type = 'File'
Contents = 'Martin was here!'
@IvanDrag0
IvanDrag0 / Reboot.ps1
Created April 19, 2024 17:30
PowerShell Reboot and Continue
# From https://github.com/PhilipRieck/MachineSetup/blob/main/Modules/Reboots.psm1
$script:RebootRequired = $false
function SetRebootRequired($value = $true){
$script:RebootRequired = $value
}
function IsRebootRequired(){
return $script:RebootRequired
}