Skip to content

Instantly share code, notes, and snippets.

@CarlosAmericano
CarlosAmericano / Save-KBFile.ps1
Created April 14, 2021 13:41 — forked from potatoqualitee/Save-KBFile.ps1
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.
@CarlosAmericano
CarlosAmericano / .. MediaCreationTool.bat .md
Created October 4, 2019 11:21 — forked from AveYo/.. MediaCreationTool.bat ..md
Universal MediaCreationTool.bat wrapper for all Windows 10 Redstone versions: 1607,1703,1709,1803,1809 with business (Enterprise) edition support

Preview1
Preview2

Update: adjusted script for easy splitting into a lite version (only missing generating RS1/RS2 business entries)

2018.10.10: reinstated 1809 [RS5]! using native xml patching for products.xml; fixed syntax bug with exit/b  
2018.10.12: added data loss warning for RS5  
2018.11.13: RS5 is officially back! + greatly improved choices dialog - feel free to use the small snippet in your own scripts  
2019.05.22: 1903 [19H1]  
2019.07.11: 1903 __release_svc_refresh__ and enable DynamicUpdate by default to grab latest CU 
@CarlosAmericano
CarlosAmericano / FullDBBackup.ps1
Created March 28, 2019 11:09 — forked from AdamLJohnson/FullDBBackup.ps1
Powershell script to backup all SQL Databases on a server. Useful for SQL Express.
$serverName = ".\SQLExpress"
$backupDirectory = "D:\backupSQL"
$daysToStoreDailyBackups = 7
$daysToStoreWeeklyBackups = 28
$monthsToStoreMonthlyBackups = 3
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoExtended") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.ConnectionInfo") | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SmoEnum") | Out-Null