Skip to content

Instantly share code, notes, and snippets.

@rstanleyhum
rstanleyhum / restic-windows-vss.ps1
Last active January 13, 2023 21:55
Restic Backup Windows Volume Shadow Copy Service script taken from https://github.com/restic/restic/issues/340
# Windows PowerShell Script to use restic to backup files using the Volume Shadow Copy Service, allowing
# that are in use to be backed up. The script must be run with elevated privileges.
# The Volume Shadow Copy Service must be enabled for the disk volume that contains the files to be backed up.
#
# Parameters
$resticExe = 'C:\Users\Username\go\bin\restic.exe'
$resticRepository = '\\SYNOLOGY212J\backups\restic-workstation'
$rootVolume = "C:\"
# List of folders to backup, separated by commas
$foldersToBackup = @(
@rstanleyhum
rstanleyhum / installAnaconda3.ps1
Created October 1, 2017 11:44
Install Anaconda3 5.0.0 script
$packageUrl = "https://repo.continuum.io/archive/Anaconda3-5.0.0-Windows-x86_64.exe"
$fileName = Split-Path $packageUrl -Leaf
$destinationDir = "C:\Users\stanley\Downloads"
$destinationPath = $destinationDir + "\" + $fileName
If (!(Test-Path -Path $destinationPath -PathType Leaf)) {
Write-Host "Downloading $fileName"
$webClient = New-Object System.Net.WebClient
$webClient.DownloadFile($packageUrl, $destinationPath)
}
@rstanleyhum
rstanleyhum / ares-boxinit.ps1
Last active February 28, 2018 23:04 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Initial Boxstarter Script for Base Configuration
# Author: R. Stanley Hum <r.stanley.hum@gmail.com>
# Last Updated: 2017-10-01
#
# Forked and modified from Jess Frazelle's boxstarter.ps1 gist (
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned