Skip to content

Instantly share code, notes, and snippets.

View transiient's full-sized avatar
💻
Typing...

Transient transiient

💻
Typing...
View GitHub Profile
@transiient
transiient / Reinstall-OneDrive.ps1
Created September 11, 2023 14:00
Reinstall OneDrive if OneDrive for Business stops working.
if ($false -eq [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544")) {
Write-Output "Run this script as an administrator, otherwise OneDrive cannot be uninstalled."
pause
exit
}
# Copy installer to a location we can run it from
cp "\\fs-central\OneDriveSetup.exe" "C:\Program Files\OneDriveSetup.exe"
# Locate existing OneDrive installation and uninstall it
@transiient
transiient / AFS-Export.ps1
Created April 13, 2023 10:40
Export Azure File Sync drive mappings from Azure to a CSV file
$RSG_Name = Read-Host "Enter the name of the Resource Group in which the Sync Service resides:"
$SyncService_Name = Read-Host "Enter the name of the Sync Service:"
$ExportPath = Read-Host "Enter the path and filename (ending with .csv) to export to:"
$StorageSyncGroups = Get-AzStorageSyncGroup -ResourceGroupName $RSG_Name -StorageSyncServiceName $SyncService_Name
$Objects = foreach ($_SSG in $StorageSyncGroups) {
$_SSE = Get-AzStorageSyncServerEndpoint -ResourceGroupName $RSG_Name -StorageSyncServiceName $SyncService_Name -SyncGroupName $_SSG.SyncGroupName
New-Object -TypeName PSObject -Property @{
# Azure Backup Runbook Script
# github.com/transiient
# https://gist.github.com/transiient/ea8873b63644afe91b0ea9e383d675d3
# 1. Fill in the information in the block below
# 2. Add to Runbook (MAKE SURE the Az module and its descentants are installed in the parent Automation Account)
# 3. Add a Schedule and link the Runbook
### !!! Fill me in !!! ###
@transiient
transiient / Azure-Find-VMs-Not-Backed-Up.ps1
Created October 6, 2022 08:21
Locate Azure VMs that aren't being backed up
# Find VMs which aren't backed up by Azure
#
# Sam Crossman (https://github.com/sam-cross)
# You'll need the Az PowerShell module for this :)
# Set subscription via Set-AzContext before running this script
$SubscriptionName = (Get-AzContext).Subscription.Name
# Enumerate all VMs in all backup vaults within the subscription
@transiient
transiient / flex-sticky-footer-example.html
Last active February 17, 2021 13:51
A simple flexbox sticky footer example.
@transiient
transiient / localStorage.html
Created June 15, 2020 21:34
A super-basic localStorage API example
<!--
Blogpost available at medium.com/@samcrossdigital
-->
<html>
<head>
<title>localStorage</title>
</head>
@transiient
transiient / DeleteGmusicDupes-Python35.py
Last active September 9, 2019 10:37 — forked from TKIPisalegacycipher/DeleteGmusicDupes-Python35.py
Python script to find and delete duplicate tracks from Google Play Music library.
#!/usr/bin/env python
# created by shuichinet https://gist.github.com/shuichinet
# forked from https://gist.github.com/shuichinet/8159878 21 Nov 2015
# using minor edits by fcrimins https://www.reddit.com/user/fcrimins from https://www.reddit.com/r/google/comments/2xzgyv/remove_duplicate_songs_from_google_play_music/csh6mrh
# also using clever edits by Morgan Gothard https://medium.com/@mgothard
# updated for Python 3.5 by John M. Kuchta https://medium.com/@sebvance 22 Nov 2016 (hey I was busy)
# compiled by John M. Kuchta https://medium.com/@sebvance
# thanks to shuichinet, fcrimins and Mr. Gothard for their work