Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Quick shell script to reboot all workspaces
# AWS only allows us to reboot 25 workspaces at a time
workspaces=(`aws workspaces describe-workspaces --directory-id ID_HERE --query 'Workspaces[*].WorkspaceId' --output text`)
i=0
ws_array=()
num_of_ws=${#workspaces[@]}
# num of workspaces
echo ${num_of_ws}
@ggsince88
ggsince88 / install-sophos.ps1
Created December 5, 2019 20:29
Installs Sophos only if trend micro is not found
# Office Scan REG KEY
# PSChildName: OfficeScanNT
#
$temp_dir = "C:\Windows\Temp"
Start-Transcript -Path $temp_dir\installsophos.txt -Append
# Below is PSChildName for Trend Micro located in Wow6432Node
$trendmicro_id = "OfficeScanNT"
# Use Sophos Display name in case there is an update the product ID
$sophos_id = "Sophos Endpoint"
$sophos_url = "https://BUCKET-URL/SophosSetup.exe"
@ggsince88
ggsince88 / Move-Filestream.ps1
Created December 5, 2019 20:26
Move MS SQL Filestream data to a different location
$startTime = (Get-Date)
# STOP REPL AGENT
$old_filestream_path = 'D:\Data\DB_DocumentObjects'
$filestream_drive = 'G:\'
$filestream_root = $filestream_drive + 'DATA\'
$filestream_path = $filestream_root + 'DB_DocumentObjects'
$db = 'DATABASE'