This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Description | |
Remove all non-whitelisted apps that come installed in Windows 10 by default. | |
Warning: Test first, and only run on a fresh install otherwise some changes may be irreversible. | |
Meant for developers that want a lean system to work with or test on. | |
.Example | |
1) Download this gist | |
2) Open Powershell as Administrator | |
3) `Set-ExecutionPolicy AllSigned -Force` to enable executing scripts | |
4) Set `$Path = <path-to-downloaded-script>` in powershell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## | |
# Win 10 / Server 2016 / Server 2019 Initial Setup Script - Default preset | |
# Author: Disassembler <[email protected]> | |
# Version: v3.10, 2020-07-15 | |
# Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script | |
########## | |
### Require administrator privileges ### | |
RequireAdmin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Win10 Initial Startup Script | |
.Description | |
Download git archive and preset file and run script to setup a new Windows 10 install. | |
See https://github.com/Disassembler0/Win10-Initial-Setup-Script | |
.Example | |
1) Open powershell as administrator | |
2) `Set-ExecutionPolicy AllSigned -Force` to allow execution of scripts | |
3) Find the raw URL to this gist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS C:\WINDOWS\system32> dism.exe /Get-WimInfo /WimFile:F:\sources\install.esd | |
Deployment Image Servicing and Management tool | |
Version: 10.0.19035.1 | |
Details for image : F:\sources\install.esd | |
Index : 1 | |
Name : Windows 10 Home | |
Description : Windows 10 Home |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is my really awesome module! | |
Examples | |
-------- | |
>>> flatten_list([[1, 2, [3, 4], 5]]) | |
... [1, 2, 3, 4, 5] | |
>>> tt = TempTracker() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################################### | |
### PowerShell console with dracula theme ### | |
### - Run this script ### | |
### - Double-check "Windows PowerShell.lnk" and "Windows PowerShell (x86).lnk" get overwritten ### | |
### Prerequisites ### | |
### 1. PSReadLine 2.0 or later, Windows comes with 1.0 installed as of 2021/12 ### | |
### 2. posh-git for git integration ### | |
### More Details ### | |
### - https://github.com/dracula/powershell/blob/master/theme/dracula-prompt-configuration.ps1 ### | |
### - https://github.com/dracula/powershell#user-content-profile-explanation ### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Change drive letters and labels on Windows using powershell | |
# On a new install, Windows maps drives somewhat randomly | |
# Details: https://devblogs.microsoft.com/powershell-community/changing-drive-letters-and-labels-via-powershell/ | |
$Drive = Get-CimInstance -ClassName Win32_Volume -Filter "DriveLetter = 'D:'" | |
$Drive | Set-CimInstance -Property @{DriveLetter='M:'; Label='Media'} | |
$Drive = Get-CimInstance -ClassName Win32_Volume -Filter "DriveLetter = 'E:'" | |
$Drive | Set-CimInstance -Property @{DriveLetter='S:'; Label='Storage'} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Sets a known folders path using SHSetKnownFolderPath. | |
.PARAMETER Folder | |
The known folder whose path to set. | |
.PARAMETER Path | |
The path. | |
#> | |
function Set-KnownFolderPath { | |
Param ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/a/9328525 | |
function(dump_cmake_variables) | |
get_cmake_property(_variableNames VARIABLES) | |
list (SORT _variableNames) | |
foreach (_variableName ${_variableNames}) | |
if (ARGV0) | |
unset(MATCHED) | |
string(REGEX MATCH ${ARGV0} MATCHED ${_variableName}) | |
if (NOT MATCHED) | |
continue() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Winget package manager | |
# Dependencies | |
# https://docs.microsoft.com/en-us/troubleshoot/developer/visualstudio/cpp/libraries/c-runtime-packages-desktop-bridge#how-to-install-and-update-desktop-framework-packages | |
$PackageName = "Microsoft.VCLibs.x64.14.00.Desktop.appx" | |
$DependencyUrl = "https://aka.ms/${PackageName}" | |
Invoke-WebRequest -Uri $DependencyUrl -OutFile (Join-Path $env:TEMP $PackageName) | |
Add-AppxPackage -Path (Join-Path $env:TEMP $PackageName) | |
# Download/Install winget |